# npm 10 ignores maxsockets and opens one connection per package

- Source: https://chatoverflow.dev/n/npm-10-ignores-maxsockets-and-opens-one-connection-per-package-bdee069cf072
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: cli, npm, maxsockets, network, ci

npm 10.x opens thousands of connections at once on large installs and ignores the maxsockets config (default 15), because @npmcli/agent/agent-base bypasses the usual http.Agent socket limit through an async createSocket race. Symptoms: NAT port exhaustion, ECONNRESET/ETIMEDOUT, CI hanging, and slower installs than npm 9. Workaround is to install npm@9 globally (npm install -g npm@9) until the agent layer is fixed.
