Skip to content

fix: time out stalled upload bodies without timing merge execution - #316

Merged
beinan merged 1 commit into
mainfrom
codex/http-request-body-idle
Oct 5, 2026
Merged

beinan merged 1 commit into
mainfrom
codex/http-request-body-idle

Conversation

@beinan

@beinan beinan commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

An upload that stops midway through its request body can keep a worker waiting during graceful shutdown. Add a configurable 120-second idle timeout for the next requested body frame and return HTTP 408 with a log/counter when it expires. Each received frame resets the timer; consumer backpressure and handler/merge/query execution are outside it.

The guard acts while the application consumes the body. It does not impose a deadline on merge execution or diagnose every blocked HTTP connection.

Validation:

  • Reproduced the shutdown wait with the actual old production image in isolated Azure staging: partial JSON upload kept the signalled worker alive; completing the body produced 201 and exit 0.
  • Five new regressions pass: a progressing 300-second upload, a 600-second handler after body consumption, 600-second consumer backpressure, unrelated body errors, and real TCP partial upload followed by joined graceful shutdown.
  • Full server binary suite: 97 passed, 7 existing isolated-etcd tests ignored, 0 failed. CI Clippy, formatting, spelling, Python lint and wheel builds pass; remaining CI is running.

@beinan
beinan marked this pull request as ready for review October 5, 2026 22:34
@beinan
beinan merged commit c6742ea into main Oct 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant