fix: adjust keep alive and request timeout for webhook calls - #1317
Merged
Conversation
Coverage Report for CI Build 31816605321Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.08%) to 81.198%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions19 previously-covered lines in 2 files lost coverage.
Coverage Stats💛 - Coveralls |
itslenny
force-pushed
the
lenny/webhook-request-fixes
branch
from
August 12, 2026 21:55
f435221 to
f4e2c61
Compare
itslenny
force-pushed
the
lenny/webhook-request-fixes
branch
3 times, most recently
from
August 13, 2026 00:05
95f9e73 to
f478e6a
Compare
fenos
approved these changes
Aug 13, 2026
itslenny
force-pushed
the
lenny/webhook-request-fixes
branch
from
August 13, 2026 15:14
f478e6a to
1202c95
Compare
fenos
pushed a commit
that referenced
this pull request
Aug 13, 2026
Ported from #1317 (originally against src/storage/events/lifecycle/webhook.ts, which moved to src/storage/events/webhooks/webhook.ts on this branch): give the AbortSignal its own connect budget on top of WEBHOOK_TIMEOUT_MS so the dispatcher headersTimeout/bodyTimeout can actually fire, and stop capping the keep-alive timeout at the request timeout.
ferhatelmas
approved these changes
Aug 14, 2026
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.
What is the current behavior?
Keep alive timeout is capped at the request timeout. Most connections are re-established (and DNS re-resolved) from
scratch on every request. This causes Webhooks to occasionally fail with
timeout of 4000ms exceededbefore the request reaches its destination.What is the new behavior?
timeout) so connections can actually be reused
headersTimeout/bodyTimeoutfrom the overall request timeout, so a stalled responseis distinguishable from a stalled connection
fetch failedbecomesfetch failed (HeadersTimeoutError: Headers Timeout Error)