#StackBounty: #javascript #mysql #node.js #reactjs MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message …

Bounty: 50

I know this might flag as a duplicate solution but solution on stack overflow is not working for me.

Problem:

(node:5716) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message lis
teners added. Use emitter.setMaxListeners() to increase limit.

My code base is huge and i facing this error sometimes i don’t know why it is happening

What I tried :

Tried to increase the listeners limit but unfortunately it is not working.

const EventEmitter = require('events');
const emitter = new EventEmitter()
emitter.setMaxListeners(50)


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.