-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
MEMORY LEAK on https module. #31285
Comments
I'm afraid there isn't much to go on without more info. Is there a way for us to reproduce? Did you take heap snapshots or anything else that might shed more light on memory consumption? |
I am not the site operator, so no. I don't know anything else. The guy can barely run his server, so I can't count on him. You can probably reproduce by just serving requests through the https module. Edit: ok, I can see if I can get something out him. I just get heap snapshots after memory is bloated? |
That would be helpful but before/after snapshots would be even better. |
For the warning, starting Node as |
https://files.catbox.moe/gsc49t.zip The -1 is for the first worker process. His server only has 1 core, so there was only a single worker process. @bnoordhuis |
Just to be clear. You are sure he is running |
I am sure, @ronag. I made http2 opt-out due to the crashes caused by the compatibility layer, confirmed with the site operator http2 was not enabled and it would have been crashing A LOT if it were. |
@ronag @bnoordhuis @addaleax so, were the dumps useful? |
I think this could be closed, feel free to reopen otherwise. |
Node version: 12.14.1
What is the scenario: an open connection for incoming https requests.
What is the issue: a site with moderate traffic had crashes due to ENOMEM every 30 minutes. Site is about 500k ranking on alexa.
Why I think the issue is a leak on https module:
1: The site operator got this warning once: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
2: As soon as the site operator stopped using the SSL on the node software and instead let nginx handle ssl and just redirect to http to the software, the issue stopped.
The usage of https in this case can be seen here:
https://gitgud.io/LynxChan/LynxChan/blob/master/src/be/workerBoot.js#L80
The text was updated successfully, but these errors were encountered: