Repository navigation
fix(v10/node-core): Register the Vercel SIGTERM listener once - #25826
Conversation
Both init() paths added a SIGTERM listener on every call when VERCEL is set, so repeated init() leaked one listener per call and flushed stale clients. Register a single shared listener that flushes the latest client, matching #25146 on v11. Fixes #25825 Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
size-limit report 📦
|
Lms24
left a comment
There was a problem hiding this comment.
Do we need this on v10 for a concrete reason? We decided to stop porting back every fix to v10, given v11 has been around for a while now and is stabilized. We can still backport it but there should be a reason to do so.
No concrete reason if we stopped supporting v10. I remember hearing that we'll be supporting v10 a bit more and that's why I got this opened. Feel free to close, I won't be offended :D |
…5880) The Next.js 16 tunnel fixture repeatedly hits its 30-second timeout on the first development Webpack test while the app and edge tunnel route compile. Production and subsequent development tests pass. The [latest failure on #25826](https://github.com/getsentry/sentry-javascript/actions/runs/40878181404/job/123465759603) records a successful tunnel response less than a second after the timeout. This allows 60 seconds for this fixture's `development-webpack` tests to accommodate cold compilation. Co-authored-by: GPT-6 <codex@openai.com>
|
Since the PR is already here and it looks good, we're just gonna merge it. We have stopped with general backports and frequent releases this week, so it might take a bit for this to be released. Thanks! |
On Vercel, both
@sentry/node-coreinit paths (default and/light) add a newSIGTERMlistener on everyinit()call, and nothing ever removes it. Processes that callinit()repeatedly therefore leak one listener per call, hitMaxListenersExceededWarningafter 10, and flush every stale client on shutdown. The Sentry CLI hits this in library mode, since it re-inits per command during bundler-plugin source-map uploads (getsentry/toolkit#1692).This takes the approach #25146 took on v11: keep one listener that flushes the latest client. That PR has a guard that registers only once. Here the helper instead checks whether its stable handler is already attached. That way, code that removes the listener (the existing tests do) gets a fresh one on the next
init(). Both init paths share the helper, so mixing default and lightinit()also leaves a single listener.This is v10-only. On
develop,node-corewas merged into@sentry/nodeand #25146 already covers it.Fixes #25825
via @BYK.
--
View Junior Session [Sentry]