node-twitter
node-twitter copied to clipboard
memory leak
Hi. I seem to have a memory leak in the stream function
(node) warning: possible EventEmitter memory leak detected. 11 data listeners added. Use emitter.setMaxListeners() to increase limit. -- Called from events.js:235:17(function EventEmitter.addListener)logMsg @ client.js:63(anonymous function) @ client.js:97c.emit @ socket.io.js:2c.onPacket @ socket.io.js:2d.onPacket @ socket.io.js:2c.onPacket @ socket.io.js:2c.onData @ socket.io.js:2websocket.onmessage @ socket.io.js:2
client.js:63 Trace
at EventEmitter.addListener (events.js:239:17)
at Namespace.
tweetplugin.js:59:
'stream.on('data', function(tweet)'
What does this mean?
Yeah my apps crashing and freezing up. Am using the stream function
This is more likely that your need to unlisten from the stream. You can set the max amount of listeners with emitter.getMaxListeners() and emitter.setMaxListeners()
However I would suggest when your done with an event listener you remove it and init it again when needed.
Can you give us some sample code in a gist or code
block?
I'm going to close this issue due to it's age, but if you'd like to continue with it feel free to reopen.
:wave: I'm getting this issue as well. We could set emitter.setMaxListeners
but I believe this is happening within the node module and not within our personally written code, right?
I am not using streams, fyi.
Thanks again :)