Reputation: 1063
Error:
(node) warning: possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit.
The question is whether to pay attention to it and increase the limits? Or can I ignore it? In fact, it does not affect
NodeJS 0.12.18
Upvotes: 0
Views: 316
Reputation: 38777
If you're expecting that EventEmitter
to have more than ten listeners, then you should use setMaxListeners()
to increase the limit.
If you were not expecting so many, then you probably have a listener leak (i.e. you keep adding instead of replacing).
Upvotes: 0