Possible EventEmitter memory leak detected. Unknown (unfindable) node


I am getting the following error pretty often in my cmd console:

(node:66456) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added to [SockJSConnection]. Use emitter.setMaxListeners() to increase limit

I do not use subflows and can not find node 66465.
I have done a text search in my flows.json and looked for that number in the search box in Node-RED.
Both return zero results.

Running node version 16.3.0
Node-RED 1.3.5

Any ideas how to find the problem node, how to fix it, or if its even a problem.


That isn't a reference to anything inside Node-RED - its a node.js warning number.

The SockJSConnection is the biggest clue - its related to whatever nodes you have that use the sockjs library under the covers.

One way to narrow it down would be to go into your Node-RED user directory, ~/.node-red and run npm list sockjs - and see what it returns.

Personally I would investigate the other errors first, which should be easy to find. It is often the case that symptoms that are difficult to track down are related to the easy ones, so sort out all the easy ones first.

Oh, the return was very unexpected....

npm list sockjs
npm notice
npm notice New minor version of npm available! 7.15.1 -> 7.20.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.20.3
npm notice Run npm install -g npm@7.20.3 to update!
npm notice
node-red-project@0.0.1 C:\Users\tbg\.node-red
`-- node-red-contrib-web-worldmap@2.15.5
  `-- sockjs@0.3.21

@dceejay any thoughts?

How many maps or worldmap-in nodes do you have in your flow ?
Does it only occur after a few deploys ? Or every time ?

I have 12 nodes (1 in 12 different flows).
It shows that message every few hours to minutes. (Hence I am finally asking for help - it just shows up a little too often).

Should I try and have the one worldmap node and use 11 link nodes to feed that one?

Yes please

No errors for 24hours.
That's the solution.

Thanks Colin, but no need.
I cant program, hence I use Node-RED.... The other errors are my failed attempts at string parsing.
Every now and then they fail for some reason. Its hard for me to catch them and debug them. They only happen now and then and don't seem as 'critical' as the main error.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.