SondreNjaastad / node-red-contrib-bluelinky

19 stars 8 forks source link

Adjust "MaxListeners" to avoid WARNings and possible leaks #86

Closed binderth closed 5 months ago

binderth commented 10 months ago

I'm using Node-Red v3.1.3 as a docker container and just recently had to restart the container and by chance got the following entry in the logfiles:

6 Jan 14:46:39 - [info] Started flows

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

(Use `node --trace-warnings ...` to show where the warning was created)

after a bit of digging: https://discourse.nodered.org/t/fixing-maxlistenersexceededwarning-possible-eventemitter-memory-leak-detected/84335 I think the reason for this WARNING is that I use 17 instances of the node in my flow.

Can you check this please and perhaps just add the maximum listeners for node-red-contrib-bluelinky?

thanks, Thomas.

PierreLevres commented 10 months ago

I wouldn't worry too much about that warning. Having it for years here, and doesn't seem to cause any troubles. What is your worry?

Hacksore commented 5 months ago

Prolly not a big deal, closing.