Node emits MaxListenersExceededWarning with v9.0.0 #502
Closed
Description
After updating to v9.0.0 I get a MaxListenersExceededWarning warning when starting more than 10 tasks via concurrently. The callstack of the warning is:
Generate source code (12 tasks) ...
0% | ETA: 0s | 0/12(node:14748) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListenert
at [kNewListener] (node:internal/event_target:562:17)
at [kNewListener] (node:internal/abort_controller:268:24)
at AbortSignal.addEventListener (node:internal/event_target:675:23)
at mycheckout\node_modules\rxjs\dist\cjs\internal\observable\fromEvent.js:38:111
at Observable._subscribe (mycheckout\node_modules\rxjs\dist\cjs\internal\observable\fromEvent.js:61:9)
at Observable._trySubscribe (mycheckout\node_modules\rxjs\dist\cjs\internal\Observable.js:41:25)
at mycheckout\node_modules\rxjs\dist\cjs\internal\Observable.js:35:31
at Object.errorContext (mycheckout\node_modules\rxjs\dist\cjs\internal\util\errorContext.js:22:9)
at Observable.subscribe (mycheckout\node_modules\rxjs\dist\cjs\internal\Observable.js:26:24)
at Object.mergeInternals (mycheckout\node_modules\rxjs\dist\cjs\internal\operators\mergeInternals.js:56:12)
In my case I start over 300 tasks (in the worst case) using concurrently. But the warning appears as soon as I have more than 10 tasks.
I also noticed that the exited
property of these tasks never seems to be set, even when the task finished correctly. I display a progress bar and for the progress-update I count all tasks in the exited
state.