Skip to content

Conversation

@AshishShanker
Copy link

When 8+ dependent tasks exist, each adds an exit listener to track completion. This listener attaches to process. So we apply the same fix that worked for stdout and stderr, and was merged through PR 16693

Current Behavior

For nx targets with 8+ dependent targets, we encounter maxListenersExceededWarning:

(node: 22553) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit.
(node: 22553) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit.
(node: 22553) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit.

Expected Behavior

No MaxListenersExceededWarning should be thrown on account of the nx run.

Related Issue(s)

Fixes #32439

When 8+ dependent tasks exist, each adds an `exit` listener to track completion. This listener attaches to `process`. So we apply the same fix that worked for `stdout` and `stderr`, and was merged through [PR 16693](nrwl#16993)
@AshishShanker AshishShanker requested a review from a team as a code owner November 24, 2025 16:59
@netlify
Copy link

netlify bot commented Nov 24, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 75668db

@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Nov 24, 2025 5:03pm

@AshishShanker AshishShanker changed the title fix: Set max listeners for process in task orchestrator fix(core): Set max listeners for process in task orchestrator Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running inferred tasks using run-many or affected causes (node:4192) MaxListenersExceededWarning

1 participant