Repository navigation
fix(node): Register Vercel keep-alive listeners once - #25146
Merged
Merged
Conversation
Member
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2c481c7. Configure here.
chargome
marked this pull request as ready for review
October 7, 2026 16:43
chargome
requested review from
JPeer264,
andreiborza and
isaacs
and removed request for
a team
October 7, 2026 16:43
Lms24
approved these changes
Oct 7, 2026
JPeer264
approved these changes
Oct 8, 2026
Contributor
size-limit report 📦
|
A repeated init() registered another SIGTERM handler and response-finish subscriber per client, so replaced clients kept being flushed and every response got an extra waitUntil. Register the listeners once and flush the current client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chargome
force-pushed
the
fix/vercel-keepalive-repeated-init
branch
from
October 8, 2026 08:44
88a9c2d to
0ac8729
Compare
The keep-alive listeners are registered once per module instance, so a second init() on Vercel in the same test file no longer adds a SIGTERM listener. Give each Vercel test a fresh module instance. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
47 tasks
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.
On Vercel, each
init()call registered anotherSIGTERMhandler and anotherhttp.server.response.finishsubscriber, each tied to its own client. A repeatedinit()replaces the client, so the old handlers kept flushing the replaced client and added an extrawaitUntilto every response. Surfaced by the Sentry review on #25125.The listeners are now registered once and flush whichever client is current. A replaced client is no longer flushed on
SIGTERM. That matchesdocs/repeated-init.md(repeatedinit()is unsupported, and buffered data stays on the old client), and it keeps the 500msSIGTERMwindow for the active client.