Backport #4458: fix(world-vercel): keep large event bodies off busy HTTP/2 connections - #4461
Merged
Merged
Conversation
#4458) Event POSTs with bodies over 1 MiB (run_started carrying a multi-MiB run input, large event batches) could not be re-buffered by the H2 multiplexing interceptor, so undici held them until the connection had zero in-flight streams and stopped its queue behind them. On busy instances they hung until the replay budget or maxDuration ran out. - Send those bodies over an HTTP/1.1 agent instead. - Upgrade undici to 7.30.0, which fixes the phantom running slot a failed HTTP/2 stream left on its connection (nodejs/undici#5410, #5569) and honors headersTimeout on HTTP/2. - Bound events requests with 60s header/body deadlines instead of undici's 300s defaults, which outlasted the 240s replay budget. - Retry event-log reads (GET only) whose stream the peer reset with ERR_HTTP2_STREAM_ERROR. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
🦋 Changeset detectedLatest commit: 0310746 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport of #4458 to
stable(backport job run).AI recommendation: This is a hang/stall fix for code that exists verbatim on
stable:packages/world-vercel/src/http-client.tsthere still has the sameh2MultiplexInterceptorthat passes un-rebuffered (>1 MiB) bodies to the HTTP/2 connection, where undici holds them until the connection drains, pinning invocations until the replay budget ormaxDurationexpires. The undici 7.29.0→7.30.0 bump (stable is on 7.28.0, also affected) is motivated by the phantom-running-slot bug that causes the same wedge, not routine maintenance, and the 60s deadlines andERR_HTTP2_STREAM_ERRORretry are bounded parts of the same defect fix. The newcreateH2MultiplexInterceptor/EVENTS_RETRY_AGENT_OPTIONSexports are internal plumbing for the fix rather than new user-facing capability, and all changesets arepatch.Merge conflicts were resolved by AI (opencode with
anthropic/claude-opus-5). Please review the conflict resolution carefully before merging.