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

possible EventEmitter memory leak #44

Open
radfahrer opened this issue Apr 11, 2016 · 5 comments
Open

possible EventEmitter memory leak #44

radfahrer opened this issue Apr 11, 2016 · 5 comments

Comments

@radfahrer
Copy link
Contributor

I'm seeing a lot of: (node) warning: possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit.. Is this a real concern?

@oyvindeh
Copy link
Owner

Thanks for reporting! I will have a look at this as soon as possible (although I cannot promise when).

@oyvindeh
Copy link
Owner

oyvindeh commented May 1, 2016

I'm unable to reproduce this. uCSS only creates two event emitters itself. But I see that Request has several issues mentioning EventEmitter memory leaks.

I've tried updating to the newest version of Request, hoping that it fixes the problem. Could you please check if the problem persists?

If this still is a problem, it may be because of a redirect loop. Setting maxRedirects in the options when doing request.get (lib/css.js and lib/html.js) may help. I would be grateful if you could try this, or provide me with the config you use so that I can reproduce and investigate further. Thanks!

@oyvindeh
Copy link
Owner

oyvindeh commented May 1, 2016

Did you, by any chance, get the warning when running tests?

@radfahrer
Copy link
Contributor Author

@oyvindeh I was getting the error when using ucss on a large complex site, I am still seeing these warnings, possibly in conjunction with timeouts

Timeout: http://localhost:3000/support/faq 
(node) warning: possible EventEmitter memory leak detected. 11 end listeners added. Use       emitter.setMaxListeners() to increase limit. 
Trace
    at Request.addListener (events.js:239:17)
    at Request.start (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:807:8)
    at Request.end (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:1418:10)
    at end (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:580:14)
    at Immediate._onImmediate    (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:594:7)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
(node) warning: possible EventEmitter memory leak detected. 11 end listeners added. Use   emitter.setMaxListeners() to increase limit.
Trace
    at Request.addListener (events.js:239:17)
    at Request.start (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:807:8)
    at Request.end (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:1418:10)
    at end (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:580:14)
    at Immediate._onImmediate  (/usr/local/lib/node_modules/ucss/node_modules/request/request.js:594:7)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

@meetwudi
Copy link

meetwudi commented Apr 5, 2017

Yup I can confirm this. I think this might be shown in new version of Node.

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

3 participants