New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGet.exe push - timeout parameter doesn't work #2785
Comments
The fix here is to move to an async stream. We did a similar fix in You will need to also add a timeout mechanism for when the stream "hangs" and bits no longer transmit, because async streams lack this feature. |
Does the latest stable nuget 3.4.4 contain this fix? Because it doesn't work for me. It keeps saying me "has timed out after 100000ms." (for -Timeout 2147483). It used to work in nuget 2.x for the same package on the same network |
Nope, 3.4.4 does not have this fix. Switch to version 3.5.0-beta2 of nuget.exe and the fix should be present: |
@joelverhagen thank you! 3.5.0-beta2 works for my case. |
NuGet Version: 3.5.0.1737 seems to miss this fix, whereas NuGet Version: 3.5.0.1520 seems to work. Is 33a3740 removed from the later builds, or is there a regression? |
Yes, this looks like a regression. I'll take a look. |
Thank you @joelverhagen. I am impressed. |
@prestonj wrote in NuGet/NuGetGallery#1094 (comment):
I'm also having this problem but the suggestion for adding the Timeout switch from @maartenba did not fix the issue for me. Seems there is another timeout on the HTTP PUT request that hits after 100 seconds. My command line is basically:
C:\test>nuget push -ApiKey xxx -Timeout 120000 -Source http://nuget.org -Verbosity Detailed mything.nupkg
The output is:
Pushing mything.nupkg to 'http://nuget.org'...
PUT http://nuget.org/api/v2/package/
PUT http://nuget.org/api/v2/package/
PUT http://nuget.org/api/v2/package/
System.AggregateException: One or more errors occurred. ---> System.TimeoutException: The HTTP request to 'PUT http://nuget.org/api/v2/package/' has timed out after 100000ms.
at NuGet.CommandLine.PushCommand.d__16.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
---> (Inner Exception #0) System.TimeoutException: The HTTP request to 'PUT http://nuget.org/api/v2/package/' has timed out after 100000ms.
at NuGet.CommandLine.PushCommand.d__16.MoveNext()<---
I'm using nuget.exe version 3.4.3.855
The text was updated successfully, but these errors were encountered: