edsu / earls

display urls being tweeted with an event hashtag
MIT License
18 stars 3 forks source link

(node) warning: possible EventEmitter memory leak detected. #11

Closed remagio closed 9 years ago

remagio commented 9 years ago

Using earls with some hashtags that are getting more loads, I'm getting lots of EventEmitter exceptions like this one:

looking up url: http://www.nytimes.com/2015/03/03/us/politics/hillary-clintons-use-of-private-email-at-state-department-raises-flags.html?_r=0
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Request.addListener (events.js:160:15)
    at Request.init (/pub/botlersec/earls/node_modules/request/request.js:618:8)
    at Request.onRequestResponse (/pub/botlersec/earls/node_modules/request/request.js:1127:10)
    at ClientRequest.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
    at Socket.socketOnData [as ondata] (http.js:1583:20)
    at TCP.onread (net.js:527:27)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Request.addListener (events.js:160:15)
    at Request.start (/pub/botlersec/earls/node_modules/request/request.js:937:8)
    at Request.end (/pub/botlersec/earls/node_modules/request/request.js:1635:10)
    at end (/pub/botlersec/earls/node_modules/request/request.js:676:14)
    at Object._onImmediate (/pub/botlersec/earls/node_modules/request/request.js:690:7)
    at processImmediate [as _immediateCallback] (timers.js:336:15)

Looking around I found it's a common issue about how many emitter are available if I'm using streams with higher volume of tweets. This link contains some referral to it: https://github.com/request/request/issues/870

edsu commented 9 years ago

What version of node are you running?

remagio commented 9 years ago

node v0.10.29

edsu commented 9 years ago

Ok, that should be good. It's just a warning that more event listeners are being added. Nothing to be worried about. See https://stackoverflow.com/questions/9768444/possible-eventemitter-memory-leak-detected