-
Notifications
You must be signed in to change notification settings - Fork 680
Open
Description
I am trying for several days to figure out the following error:
Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:259:19)
at Connection.addListener (events.js:275:10)
at Connection.Readable.on (_stream_readable.js:687:35)
at Connection.once (events.js:301:8)
at Connection._send (/opt/push/server/releases/20170202150908/node_modules/http2/lib/protocol/connection.js:356:10)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)`
After a long period of debugging (not that memory leaks warnings are debug-able), I think I found from where this error is coming from, server is up and no warnings in the last 24 hours.
I have added after this._connection:
this._connection.setMaxListeners(0);
I know this is not the solution (infinite listeners is a bad idea), but I am tired of figuring out what the hell is happening there, maybe a second pair of eyes can see the leak.
GNU/Linux
NodeJS 6.9.4
NPM 3.10.10
I do not have a reproducible code that emits that warning because it happens once every now and then.
If this only happens to me, then my bad, sorry.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels