Restore and HTTP timeout (probably due to TCP parallel connections being throttled) #8120
Labels
Area:HttpCommunication
Functionality:SDK
The NuGet client packages published to nuget.org
Priority:3
Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.
Type:Feature
Milestone
Please read the following information before posting the issue.
Details about Problem
NuGet product used: NuGet client API
NuGet version (x.x.x.xxx): 5.0
OS version: win10
Detailed repro steps so we can see the same problem
Only happen on slow connections:
Install Xenko Launcher (https://xenko.com/download)
Install latest version of Xenko
Note: Xenko is quite big, around 60 packages with a total size of 300 MB.
Some people (with slow connections) have timeout issues:
Can't install Xenko stride3d/stride#310
Other suggested things
My best guess on what's happening:
Some ISP throttle TCP connections: even though NuGet open 10 TCP connections, only 2 will actively progress and the other will be put on hold until some other finishes. Given a slow enough download rate, 2 running download could last more than 100 second and will result in other pending connections to be considered timeout by NuGet (note: the timeout is not at HTTP level but just NuGet measuring time of a call and cancelling if too long).
Note: timeout also happen on very simple/small files that should not timeout and are perfectly working, such as https://api.nuget.org/v3-flatcontainer/xenko.assets/index.json (source: stride3d/stride#310)
Unsuccessful attempts to mitigate:
RestoreRequest.MaxDegreeOfConcurrency
but I think it only affect number of high level tasks, not the number of parallel downloads.HttpSourceCachedRequest.RequestTimeout
is assigned (indirectly) fromHttpSourceRequest.DefaultRequestTimeout
which is a static field.Verbose Logs
Recently got a full NuGet log of someone having the issue:
XenkoLauncherLog.txt
Sample Project
Our NuGet package download high-level function is there:
https://github.com/xenko3d/xenko/blob/master/sources/assets/Xenko.Core.Packages/NugetStore.cs#L293
The text was updated successfully, but these errors were encountered: