-
Notifications
You must be signed in to change notification settings - Fork 246
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
[agent-base] maxSockets
not being respected
#299
Comments
No pressure or anything, but.. I would like to add it has a "Prio 0" label at NPM. Just saying 😆 lol. Meaning this issue is causing quite some problems on routes/switches/proxies/Jfrog Artifactory/NPM package repository and more. Both for individuals (at home) as well as in businesses alike. After all the huge amount of socket connections isn't scaling very well on consumer hardware or even server hardware. |
Updated the reproduction to include sync and async versions of Here's what I get when running it now:
|
When used with the
maxSockets
optionagent-base
creates more than that number of open sockets.This was found in
npm
which recently moved to usingagent-base
in v10 (npm/cli#7072). Here's a comment from someone who debugged and found an incompatibility between how Node tracks open sockets and howagent-base
callssuper.createSocket
: npm/cli#7072 (comment).I was able to create a more minimal reproduction which I believe backs up that assertion. However, I'm happy to be told I'm holding it wrong too 😄
Reproduction
The text was updated successfully, but these errors were encountered: