# Possible EventEmitter memory leak detected. Unknown (unfindable) node

**URL:** https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114
**Category:** General
**Created:** [30 July 2021 13:48 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114 "2021-07-30T13:48:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [30 July 2021 13:48 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/1 "2021-07-30T13:48:33Z")

</div>

Greetings.

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cd8dfb2ac365a31515eac991b59e1caf80badea5.png)

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

Thanks.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [30 July 2021 13:52 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/2 "2021-07-30T13:52:16Z")

</div>

> [@thebaldgeek](#):
>
> node:66456

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.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [30 July 2021 14:06 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/3 "2021-07-30T14:06:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [30 July 2021 14:08 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/4 "2021-07-30T14:08:51Z")

</div>

> [@knolleary](#):
>
> and see what it returns

Oh, the return was very unexpected....

```auto
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?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [31 July 2021 07:57 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/5 "2021-07-31T07:57:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [31 July 2021 22:42 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/6 "2021-07-31T22:42:52Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [1 August 2021 00:18 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/7 "2021-08-01T00:18:28Z")

</div>

> [@thebaldgeek](#):
>
> Should I try and have the one worldmap node and use 11 link nodes to feed that one?

Yes please

---

<div class="post-metadata">

### Author: ![thebaldgeek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thebaldgeek/32/93523_2.png) [@thebaldgeek](https://discourse.nodered.org/u/thebaldgeek)
#### Post date: [4 August 2021 00:00 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/8 "2021-08-04T00:00:32Z")

</div>

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

> [@Colin](#):
>
> Personally I would investigate the other errors first

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [18 August 2021 00:00 UTC](https://discourse.nodered.org/t/possible-eventemitter-memory-leak-detected-unknown-unfindable-node/49114/9 "2021-08-18T00:00:50Z")

</div>

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