fix(core): set max listeners for process in task orchestrator#33596
fix(core): set max listeners for process in task orchestrator#33596leosvelperez merged 2 commits intonrwl:masterfrom
Conversation
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)
👷 Deploy request for nx-docs pending review.Visit the deploys page to approve it
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 548da15
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
Our test failures in the Storybook e2e tests appear to be environment-related rather than caused by the listener limit changes in this PR. The Storybook dev server processes are being killed during startup (showing "Killed" messages and timeouts), but the PR only adjusts max listeners to prevent warnings - it wouldn't cause process termination. These failures likely indicate resource constraints in the CI environment affecting long-running e2e tests.
No code changes were suggested for this issue.
If the issue was transient, you can trigger a rerun by pushing an empty commit:
git commit --allow-empty -m "chore: trigger rerun"
git push
🎓 Learn more about Self-Healing CI on nx.dev
leosvelperez
left a comment
There was a problem hiding this comment.
Thanks for contributing!
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](#16993) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> 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 <!-- This is the behavior we should expect with the changes in this PR --> No `MaxListenersExceededWarning` should be thrown on account of the nx run. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #32439 Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |

When 8+ dependent tasks exist, each adds an
exitlistener to track completion. This listener attaches toprocess. So we apply the same fix that worked forstdoutandstderr, and was merged through PR 16693Current Behavior
For
nxtargets with 8+ dependent targets, we encountermaxListenersExceededWarning:Expected Behavior
No
MaxListenersExceededWarningshould be thrown on account of the nx run.Related Issue(s)
Fixes #32439