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

EventEmitter memory leak #931

Closed
shobhitsinghal624 opened this issue Sep 30, 2013 · 2 comments
Closed

EventEmitter memory leak #931

shobhitsinghal624 opened this issue Sep 30, 2013 · 2 comments

Comments

@shobhitsinghal624
Copy link

I am seeing these a lot :

(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Request.EventEmitter.addListener (events.js:160:15)
    at Request.init (/home/ubuntu/sails-app/node_modules/request/request.js:368:8)
    at Request.onResponse (/home/ubuntu/sails-app/node_modules/request/request.js:794:10)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1689:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:120:23)
    at Socket.socketOnData [as ondata] (http.js:1584:20)
    at TCP.onread (net.js:525:27)
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Request.EventEmitter.addListener (events.js:160:15)
    at Request.start (/home/ubuntu/sails-app/node_modules/request/request.js:612:8)
    at Request.end (/home/ubuntu/sails-app/node_modules/request/request.js:1212:28)
    at /home/ubuntu/sails-app/node_modules/request/request.js:416:12
    at process._tickDomainCallback (node.js:459:13)

Any ideas how to resolve the issue.

@shobhitsinghal624
Copy link
Author

My bad. This doesn't look like a sails issue. For anyone who reaches here by mistake, this SO question gives a nice perspective on the problem - http://stackoverflow.com/questions/18427485/node-js-request-memory-leaking

Closing the issue.

@mikermcneil
Copy link
Member

For future reference, there's more information and tips on diagnosing memory leaks in Node apps, and on reproducing+reporting suspected memory leaks in Sails here: #3782 (comment)

@balderdashy balderdashy locked and limited conversation to collaborators Aug 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants