Rotonde / rotonde-client

Rotonde Base Client
https://client-neauoire.hashbase.io/
MIT License
227 stars 49 forks source link

node.js: "Possible EventEmitter memory leak detected" #188

Open finnoleary opened 6 years ago

finnoleary commented 6 years ago

After following neauoire's feed and scrolling a little, I have this warning flood my terminal:

(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
(node:1410) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 download listeners added. Use emitter.setMaxListeners() to increase limit
0x0ade commented 6 years ago

My guess: RotonDB calls createFileActivityStream once per archive, but the error message seems to indicate that we're hitting a global (Beaker?) limit.

If the error really stems from RotonDB's usage of createFileActivityStream, I unfortunately don't know how to prevent this. Sorry.

pfrazee commented 6 years ago

This is just a warning. Having a lot of event handlers registered can be a sign of a leak. I haven't looked into whether it's actually a leak or the natural usage by Rotonde. Either way, it's more of a Beaker problem than a Rotonde problem