You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running npm ci, I run into "503 too many connection" errors. After investigating, it turns out that the maxsockets option which npm passes to this lib has no effect if a proxy is used. I verified this by setting DEBUG=https-proxy-agent:agent and running npm:ci. I can observe that the library opens 1700+ connections before the first one is closed again.
Expected Behavior
I'd expect the library to respect maxsockets when using a HTTP proxy.
Steps To Reproduce
Use any http proxy with a connection limit
Run npm ci (or any other large resolve action)
Observe the connection limits being exceeded
Environment
npm: 9.3.1
Node: v18.13.0
OS: Windows (this happens on Linux / our CI/CD too)
platform: Dell Laptop & CI/CD Servers
The text was updated successfully, but these errors were encountered:
This used to happen pre NPM 6, but was intermittently fixed in NPM 6. When we tried updating to Node 16 (with the associated NPM update), this started happening again. Since Node 14 (the last version with an old enough NPM where this doesn't happen) is out of support soon, we have to update now, but this issue is causing all of our builds to fail since our corporation uses a privoxy to whitelist URLs from within the build environment. That proxy has a connection limit of about 1000, which our NPM installs exceed easily after upgrading past Node 14.
My current analysis is: make-fetch-happen / pacote except https-proxy-agent to take care of the per-origin connection limit, but that package doesn't implement any limiting.
Is there an existing issue for this?
Current Behavior
I am using a http-proxy to connect to a private registry.
(By setting https-proxy = http://someproxy:3128 in npmrc).
When running npm ci, I run into "503 too many connection" errors. After investigating, it turns out that the maxsockets option which npm passes to this lib has no effect if a proxy is used. I verified this by setting DEBUG=https-proxy-agent:agent and running
npm:ci
. I can observe that the library opens 1700+ connections before the first one is closed again.Expected Behavior
I'd expect the library to respect maxsockets when using a HTTP proxy.
Steps To Reproduce
npm ci
(or any other large resolve action)Environment
The text was updated successfully, but these errors were encountered: