Error after upgrading

Good afternoon

I'm upograding my system to latest versions and have error as follows at start:

(node:7539) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit

I have even disabled all flows but still having this message on debug, what could be the problem?

Thanks in advance

There isnโ€™t a problem, you have 11 listeners set and if you need then all thatโ€™s fine itโ€™s an automatic warning not an error

It doesnโ€™t mean thereโ€™s actually a memory leak.

It comes up in the forum from time to time, Iโ€™m sure a search would return an answer from CJ or Nickโ€ฆ

Where I can set the number of listeners for not having the message?

As already answered....

You could start with this thread.

1 Like

The message tells:

Use emitter.setMaxListeners() to increase limit

However I don't know exactly where or how I should do this, any tip to follow is welcome.


I think it has to be set in the node causing the problem. However as has been stated, it is just a warning so you should be able to ignore it. It is likely from one of the config nodes which is why disabling the flows does not stop it.

Perfect, thanks boss, I will keep moving forward to complete updates

If you do or can identify the node that would be helpful to try and get it fixed.

I don't know how to search for it, I was trying to enable disable flows but didn't find it, any tip on how to look for it?


maybe there are more lines in the error log than just the one you posted ?

Well for now what seems clear that arduino node is giving problems, during restart the pi at the begining it connected to the board as I see the relays switching but later on is not working.

If I go to the flow I see connecting and there is no way to make it work even trying to configure again the port.
However If I remove the usb cable from the pi and plug again (that makes force to change the port from usb0 to usb1) then I change the port on the config node and deploy, then it works again.

To start seems latest 0.2.2 is in trouble with the usb serial port.


From other side and less important even not having connetion of after unplug/plug usb cable and change the port on config node + reload page always shows outputs as connected and inputs as connecting.

How can I downgrade to a previous version?

1 Like

Well, after many trials and attemps I think I have the clue....

I originally thought it was related to the serial port as apparently loads for a second after service restart but then is gone...node-red-node-serialport but after testing found no difference.

The point is with node-red-node-arduino versions 0.1.0 or previous it works fine, with 0.2.2/0.2.1 or 0.2.0 it has a problem, I see relays making a blink at service boot up what means it connects for a moment but afterwarts is gone and does not connect anymore.

If I diconect usb cable and connect again so raspi reassign to port usb1, I change it on arduino config node and restart it will work at deploy, but as soon as you restart service again it will be again failing.

Hope that helps someone else, for now I remain at 0.1.0 npm version, proceed with>

npm install node-red-node-arduino@0.1.0

note I have latest version up to date for everything

Thanks for your time guys.


Good clues. Thanks

What version of nodejs are you using?

By the way, if you want to track down that listeners issue, try turning up the Node-RED logging level in settings.js. It produces a shed-load of output but should let you see what Node is loading when you get the error.

0 Jul 18:42:12 - [info] Node-RED version: v0.20.7
20 Jul 18:42:12 - [info] Node.js version: v8.16.0
20 Jul 18:42:12 - [info] Linux 4.19.57-v7+ arm LE
20 Jul 18:42:25 - [info] Dashboard version 2.15.5

pi@raspberrypi:~/.node-red $ npm list --depth=0
node-red-project@0.0.1 /home/pi/.node-red
โ”œโ”€โ”€ node-red@0.20.7
โ”œโ”€โ”€ node-red-contrib-bigtimer@2.2.3
โ”œโ”€โ”€ node-red-contrib-broadlink@0.2.4
โ”œโ”€โ”€ node-red-contrib-counter@0.1.5
โ”œโ”€โ”€ node-red-contrib-cpu@0.0.4
โ”œโ”€โ”€ node-red-contrib-cron@0.0.4
โ”œโ”€โ”€ node-red-contrib-debounce@0.0.2
โ”œโ”€โ”€ node-red-contrib-google-home-notify@0.0.7
โ”œโ”€โ”€ node-red-contrib-ibm-watson-iot@0.2.8
โ”œโ”€โ”€ node-red-contrib-influxdb@0.3.0
โ”œโ”€โ”€ node-red-contrib-inotify@1.1.0
โ”œโ”€โ”€ node-red-contrib-moment@3.0.3
โ”œโ”€โ”€ node-red-contrib-play-audio@2.3.2
โ”œโ”€โ”€ node-red-contrib-reverse@1.0.2
โ”œโ”€โ”€ node-red-contrib-schedex@1.6.2
โ”œโ”€โ”€ node-red-contrib-smartswitch@0.0.1
โ”œโ”€โ”€ node-red-contrib-telegrambot@5.5.1
โ”œโ”€โ”€ node-red-contrib-upper@0.1.4
โ”œโ”€โ”€ node-red-contrib-uppercase@0.0.3
โ”œโ”€โ”€ node-red-dashboard@2.15.5
โ”œโ”€โ”€ node-red-node-arduino@0.1.0
โ”œโ”€โ”€ node-red-node-email@1.6.2
โ”œโ”€โ”€ node-red-node-ping@0.0.16
โ”œโ”€โ”€ node-red-node-random@0.1.3
โ”œโ”€โ”€ node-red-node-serialport@0.8.3
โ”œโ”€โ”€ node-red-node-smooth@0.1.0
โ”œโ”€โ”€ node-red-node-sqlite@0.3.7
โ””โ”€โ”€ node-red-node-tail@0.0.3