Skip to content
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

Closed
skofman1 opened this issue May 13, 2016 · 7 comments
Closed

NuGet.exe push - timeout parameter doesn't work #2785

skofman1 opened this issue May 13, 2016 · 7 comments
Assignees
Labels
Product:NuGet.exe NuGet.exe Type:DCR Design Change Request
Milestone

Comments

@skofman1
Copy link
Contributor

skofman1 commented May 13, 2016

@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

@yishaigalatzer
Copy link

The fix here is to move to an async stream. We did a similar fix in httpsource to allow downloading very large packages.

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.

CC @spadapet @joelverhagen

@EgorBo
Copy link

EgorBo commented Jul 29, 2016

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

@joelverhagen
Copy link
Member

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:
https://dist.nuget.org/win-x86-commandline/v3.5.0-beta2/NuGet.exe

@EgorBo
Copy link

EgorBo commented Jul 29, 2016

@joelverhagen thank you! 3.5.0-beta2 works for my case.

@jogerh
Copy link

jogerh commented Sep 29, 2016

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?

@joelverhagen joelverhagen reopened this Sep 29, 2016
@joelverhagen joelverhagen modified the milestones: 3.5 RTM, 3.5 Beta2 Sep 29, 2016
@joelverhagen
Copy link
Member

Yes, this looks like a regression. I'll take a look.

@jogerh
Copy link

jogerh commented Sep 29, 2016

Thank you @joelverhagen. I am impressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product:NuGet.exe NuGet.exe Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

7 participants