-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: nodeIssues related to the Sentry Node SDKIssues related to the Sentry Node SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
7.80.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Sentry.init({
dsn: process.env.SENTRY_DSN,
});Steps to Reproduce
Launch my Sentry-enabled app, via PM2 or nohup, with an issue that causes it to crash during initialization.
Sample script:
const Sentry = require('@sentry/node');
async function main() {
Sentry.init({ dsn: process.env.SENTRY_DSN });
await Sentry.enableAnrDetection({ captureStackTrace: true });
process.exit();
}
main();Run via nohup node test.js or node test.js (observed in macOS - nohup use of may not be necessary).
Expected Result
The child sentry-anr process exits when the parent process does, or it exits as soon as it realizes that the parent is no longer available.
Actual Result
The child sentry-anr process continues to run indefinitely. (In our case, PM2 automatically restarted the parent each time it crashed, which caused another persistent sentry-anr child on each restart attempt, which exhausted the system's memory.)
Metadata
Metadata
Assignees
Labels
Package: nodeIssues related to the Sentry Node SDKIssues related to the Sentry Node SDK
Projects
Status
No status