- Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Type of issue: Bug
What is the current behavior?
Under certain specific conditions, yarn install often fails with an ETIMEDOUT error. This is due to the MacOS being very aggressive in closing connections.
If the current behavior is a bug, please provide the steps to reproduce.
The repro depends on a private feed which we cannot share.
Here is what happens:
- We set the "network-timeout=60000" (10min)
- We have a clean yarn cache
- We download more than 2000 packages on yarn install in our build agents
- Our npm feed returns redirects to a large number of blob storages which have each a different domain name. This means that on yarn install creates a large number of connections.
- If one of these connections is unused for a while during the install, MacOS will close it.
- When yarn later tries to re-use this connection, it gets a ETIMEDOUT error and fails.
- Note that the install lasts less than 10min so the error we get does not come from the user defined timeout.
Note:
- Yarn retries on ESOCKETTIMEDOUT error so it seems logical to also retry on ETIMEDOUT
- There are two different situations that create an ETIMEDOUT error:
1 - The situation described above, the error is thrown from Nodejs.
2 - The timeout defined by the user is hit and the code in the package "Request" throws.
What is the expected behavior?
Yarn should retry when such error occurs.
Please mention your node.js, yarn and operating system version.
node.js: 10.15.3
yarn: 1.15.2
OS: MacOS 10.14.4 (Mojave)
asmundg
Metadata
Metadata
Assignees
Labels
No labels