Answers for "11 connection listeners added to [Namespace]. Use emitter.setMaxListeners() to increase limit"

0

11 connection listeners added to [Namespace]. Use emitter.setMaxListeners() to increase limit

// Change to 80 or 150 whatever and see what happens
require('events').EventEmitter.prototype._maxListeners = 70;
require('events').defaultMaxListeners = 70;

  process.on('warning', function (err) {
    if ( 'MaxListenersExceededWarning' == err.name ) {
      console.log('o kurwa');
      // write to log function
      process.exit(1); // its up to you what then in my case script was hang

    }
  });
Posted by: Guest on September-28-2021

Code answers related to "11 connection listeners added to [Namespace]. Use emitter.setMaxListeners() to increase limit"

Code answers related to "Javascript"

Browse Popular Code Answers by Language