Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs: MaxListenerExceededWarning #1

Open
lynxis opened this issue Sep 6, 2019 · 2 comments
Open

nodejs: MaxListenerExceededWarning #1

lynxis opened this issue Sep 6, 2019 · 2 comments

Comments

@lynxis
Copy link
Member

lynxis commented Sep 6, 2019

I've found the following warning in the log

Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit
Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added. Use emitter.setMaxListeners() to increase limit
Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 rssiUpdate listeners added. Use emitter.setMaxListeners() to increase limit
Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 connect listeners added. Use emitter.setMaxListeners() to increase limit
Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added. Use emitter.setMaxListeners() to increase limit
Sep 06 00:57:49 door nodejs[576]: (node:576) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 rssiUpdate listeners added. Use emitter.setMaxListeners() to increase limit

@binaryDiv
Copy link
Member

Der obige Fehler (MaxListenersExceededWarning) trat eben wieder auf, einen Moment später fand ich einen Stacktrace im Log. Glaub das ist neu.

Sep 08 21:38:32 door nodejs[22008]: (node:22008) UnhandledPromiseRejectionWarning: Error: Peripheral already connected
Sep 08 21:38:32 door nodejs[22008]:     at Peripheral.connect (/opt/afra_door/node_modules/keyble/node_modules/simble/node_modules/noble/lib/peripheral.js:43:26)
Sep 08 21:38:32 door nodejs[22008]:     at Promise (/opt/afra_door/node_modules/keyble/node_modules/simble/simble.js:550:33)
Sep 08 21:38:32 door nodejs[22008]:     at new Promise (<anonymous>)
Sep 08 21:38:32 door nodejs[22008]:     at _Class.ensure_connected (/opt/afra_door/node_modules/keyble/node_modules/simble/simble.js:545:14)
Sep 08 21:38:32 door nodejs[22008]:     at _Class.ensure_discovered (/opt/afra_door/node_modules/keyble/node_modules/simble/simble.js:569:19)
Sep 08 21:38:32 door nodejs[22008]:     at simble.scan_for_peripheral.then (/opt/afra_door/node_modules/keyble/keyble.js:864:25)
Sep 08 21:38:32 door nodejs[22008]:     at <anonymous>
Sep 08 21:38:32 door nodejs[22008]:     at process._tickCallback (internal/process/next_tick.js:188:7)
Sep 08 21:38:32 door nodejs[22008]: (node:22008) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
Sep 08 21:38:32 door nodejs[22008]: (node:22008) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

binaryDiv added a commit that referenced this issue Sep 8, 2019
@binaryDiv
Copy link
Member

Hab mal die defaultMaxListeners von 10 (default) auf 30 gesetzt. Ist keine Lösung fürs eigentliche Problem, macht aber den Server eventuell etwas stabiler...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants