Skip to content

Commit fa211ab

Browse files
committed
Increase default timeout value from 30s to 5m
Re: #26 Re: npm/cli#1151 The previous default of 30s was too small for lots of users, causing problems when they attempt to download large objects from the npm registry. Bump up the default timeout to 5m. TODO: add a `--fetch-timeout` option on the CLI to explicitly set `timeout` in the npm.flatOptions object passed to all dependencies. PR-URL: #28 Credit: @isaacs Close: #28 Reviewed-by: @isaacs
1 parent ebddbe7 commit fa211ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ See also [`opts.ca`](#opts-ca).
571571
##### <a name="opts-timeout"></a> `opts.timeout`
572572

573573
* Type: Milliseconds
574-
* Default: 30000 (30 seconds)
574+
* Default: 300000 (5 minutes)
575575

576576
Time before a hanging request times out.
577577

default-opts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
maxSockets: 12,
77
method: 'GET',
88
registry: 'https://registry.npmjs.org/',
9-
timeout: 30 * 1000,
9+
timeout: 5 * 60 * 1000, // 5 minutes
1010
strictSSL: true,
1111
noProxy: process.env.NOPROXY,
1212
userAgent: `${pkg.name

0 commit comments

Comments
 (0)