-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 0will get attention right awaywill get attention right awayRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Milestone
Description
What / Why
The maxsockets configuration have changed from 50 -> 'Infitinity' during the refactoring of the config defaults in #2878
This change reverts to the behavior before this option was added, where npm tries to fetch all dependencies in parallell, potentially opening 1000+ connections, which causes all sorts of problems for users network environments (firewalls, proxies etc.).
When
The regression happend in #2878 and was released in v7.7.0
I can't find any discussion as to why this default should be changed, so I conclude that is clearly a regression.
Where
- n/a
How
Current Behavior
as of v7.7.0 the default is 'Infinity'
define('maxsockets', {
default: Infinity,
type: Number,
description: `
The maximum number of connections to use per origin (protocol/host/port
combination).
`,
flatten (key, obj, flatOptions) {
flatOptions.maxSockets = obj[key]
},
})https://github.com/npm/cli/blob/latest/lib/utils/config/definitions.js#L1156
Steps to Reproduce
- n/a
Expected Behavior
The old, pre v7.7.0 default:
maxsockets: 50,Who
References
- n/a
fengkx
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 0will get attention right awaywill get attention right awayRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release