How can I find out which node generates MaxListenersExceededWarning

Hi,

after a couple of time (between hours and days) I see the following message in the syslog:
node:346 MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit

My node red project is quite big, how can I find out wich node makes the problem? What's the number 346?

Kind regards

Click on the node ID link on the error message in your debug tab. It will automatically tab to the node generating the error and highlight it in the flow if you mouse over the error.

55%20AM

Hi,
The debug tab only shows the message if the browser is activated. It takes minutes to days to get the error. Therefore it is not that easy to see that message. Actually I was only able to see it in the log files. And only node:346 is shown.
I will try to leave the browser running.

As it's an async warning throw by a node I'd be surprised if anything ends up in the sidebar. But is is only a warning. Some node is probably not closing properly on redeploys and so keeps adding more listeners - or maybe remaking a connection and adding another listener. What extra nodes that do comms do you have ?

Hi,

I assume, that the node-red-contrib-kodi makes the problem. It seams, that the kodi input does not work anymore after this message.

additionally I use the following nodes which maybe generates the problem:

  • node-red-contrib-usbhid
  • node-thermal-printer
  • n2n

do you have any idea?

I'm surprised something stops working as it's just a warning. If you can manage without any of the nodes then removing them from the flow one by one is one way to narrow it down.