Repository navigation
12.9.0 MaxListenersExceededWarning #29239
Copy link
Copy link
Closed
Labels
httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
Description
- Version: v12.9.0
- Platform: All platforms [This line edited by @Trott to help people arriving at this issue/]
Started to happen after updating to 12.9.0. I'm getting:
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
even when doing npm i in a project:
C:\Users\xmr\Desktop\bootstrapcdn>npm i
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:3860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
...
Going back to 12.8.1 and the warnings are gone.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.
Activity
mscdex commentedon Aug 21, 2019
Do you have a minimal code example to reproduce this?
XhmikosR commentedon Aug 21, 2019
Sorry, I don't :/ I just noticed this with a simple npm install.
ex1st commentedon Aug 21, 2019
Simple to reproduce:
targos commentedon Aug 21, 2019
I can reproduce.
Here's the stack trace:
targos commentedon Aug 21, 2019
_http_client.js:670points to #29081/cc @ronag @mcollina
ex1st commentedon Aug 21, 2019
Hi @targos, I've caught same warning on Linux.
ronag commentedon Aug 21, 2019
I suspect I know what it is. My computer broke so I need to sort that out. Will have a PR later today.
mcollina commentedon Aug 21, 2019
@targos let’s do a revert with fast-track and get 12.9.1 out of the door asap :/.
Revert "http: simplify drain()"
Trott commentedon Aug 21, 2019
Revert PR is in #29244
ronag commentedon Aug 21, 2019
@XhmikosR: Are you able to confirm whether #29245 solves your issue?
XhmikosR commentedon Aug 21, 2019
If I had a Windows binary I could :)
25 remaining items
juarezfrench commentedon Aug 25, 2019
msreekm commentedon Aug 25, 2019
http: fix event listener leak
Trott commentedon Aug 26, 2019
12.9.1 release which fixes this is being prepared and should be out in the next 36 hours or so (although that's merely a prediction based on passed experience, not a promise/guarantee).
Reproducing the FAQ above for visibility:
What version/OS/etc. does this affect?
Node.js 12.9.0, all environments Windows, macOS, Linux, Docker, yarn, npm, you-name-it, if it's using Node.js 12.9.0, it's affected.
What are the ramifications of this bug?
If you're hitting it through
npmoryarn, probably nothing other than seeing the warnings. Your package installations should work just fine.I am hitting this same bug on this or that platform using this or that tool.
Thanks. Please don't post "this is affecting me too" comments and please don't be offended if your comment gets hidden as "off topic" to try to keep this issue as usable as possible. As noted above, this affects everything on Node.js 12.9.0.
When is a fix coming out?
Probably some time on August 27 (UTC).
I'm hitting this bug in some other version than Node.js 12.9.0.
Probably not, but you may have a different issue triggering the same warning. Open a separate issue in https://github.com/nodejs/help or (if you are reasonably certain the issue is with Node.js itself) in this repository.
XhmikosR commentedon Aug 26, 2019
v12.9.1 is out, thanks for the fix!
SamAsEnd commentedon Aug 28, 2019
Hey guys
I just wanna confirm that I had the same bug a couple of hours ago with a message like this
I was on
Linux Mint 19.1andNode 12.9.0-1nodesource1I have updated my nodejs to
12.9.1-1nodesource1and run the same install and everything is working great with noMaxListenersExceededWarning🥇
SVendittelli commentedon Sep 2, 2019
ronag commentedon Sep 2, 2019
@SVendittelli: If you are getting this on v10 please open a separate issue. This specific issue was cause by a regression introduced in 12.9.0.
SVendittelli commentedon Sep 3, 2019
ediardo commentedon Sep 20, 2019
Trott commentedon Sep 20, 2019
If you are seeing this message and running Node,js 12.9.0, update to the most recent 12.x.
If you are seeing this message with some other version of Node.js, it is not this issue. It is most likely that you have a bug in your code (or there's a bug in one of your dependencies). Or there's no bug but your code is creating a lot of listeners. Or maybe it's a different bug in Node.js. Open an issue in https://github.com/nodejs/help. (Or if you are very certain the bug is in Node.js itself, open an issue in this issue tracker.)
I am going to lock this issue.