binarycaching: Allow setting NuGet network operations timeout #18483
Labels
category:documentation
To resolve the issue, documentation will need to be updated
category:vcpkg-feature
The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Is your feature request related to a problem? Please describe.
While using the NuGet binarycaching feature for large packages like LLVM, I am running into network timeout issues while trying to push the package due to slow internet upload connection.
The default timeout for NuGet is 100 seconds, as documented here by usage of
HttpClient
: https://github.com/NuGet/NuGet.Client/blob/84d2f4e24f1f3e055dcc6056ae158d2e35123bd9/test/NuGet.Clients.FuncTests/NuGet.CommandLine.FuncTest/Commands/PushCommandTest.cs#L35-L36Proposed solution
NuGet has the option to specify a
-Timeout
option to specify the number of seconds to allow before timing out. Ideally this could be configurable through a command-line option or environment variable (I'm not sure which is better, probably environment variable?) for vcpkg.Describe alternatives you've considered
I'm not sure if there is a way to configure the timeout for NuGet without touching the command-line arguments. After searching around, I haven't found an option that would appear in the NuGet config file, and I'm not familiar with any other configuration files that would let me do this.
I've been able to create a hard-coded patch in the meantime, but this probably isn't ideal for everyone:
Additional context
I've added the extra second (1 hour and 1 second) just to make sure I don't hit the potential issue with how NuGet calculates the timeout:
https://jfrog.com/knowledge-base/how-to-resolve-nuget-push-failures-after-5-minutes-even-though-timeout-value-is-set-as-greater-than-5-minutes-300-seconds/
Thank you!!
The text was updated successfully, but these errors were encountered: