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

Provide a way to adjust the httpclient timeout for layer pushes #543

Open
baronfel opened this issue Jan 25, 2024 · 9 comments
Open

Provide a way to adjust the httpclient timeout for layer pushes #543

baronfel opened this issue Jan 25, 2024 · 9 comments
Labels
Area: Registries Tasks/Issues around communicating with asset registries
Milestone

Comments

@baronfel
Copy link
Member

baronfel commented Jan 25, 2024

Users aren't always in control of their network - we should provide some way for them to override the default .NET timeout for uploads (100s). This pops up in a few places, like Azure/azure-dev#3212.

Thoughts:

  • since the user can cancel the operation at any time, should we just set an infinite timeout? If we do, we will likely need to adapt all existing callsites for the small operations to have short timeouts to prevent hangs. The Timeout in the HttpClient is used to create a linked cancellationToken that cancels after that duration, so we can orchestrate the same here - or simply use the new WaitAsync(TimeSpan) methods on Task<T> to make that super clear.
    • Note that if we use the generic WaitAsync, those throw TimeoutExceptions with little detail, so we should handle them and make them say something useful.

cc @rainersigwald @MichalPavlik

@BartNetJS
Copy link

got the same issue, see Azure/azure-dev#3225 (comment)

@baronfel baronfel added this to the 8.0.300 milestone Jan 29, 2024
@baronfel
Copy link
Member Author

This also bit @mitchdenny hard today.

@baronfel
Copy link
Member Author

Customers are hitting this repeatedly on the linked issue. We may need to bump priority + backport to 8.0.200 since Aspire is using that feature branch.

cc @MichalPavlik / @rokonec / @rainersigwald

@tmds
Copy link
Member

tmds commented Feb 23, 2024

I wonder if the issue isn't caused by the SDK not doing chunked uploads, see Azure/azure-dev#3212 (comment).

@baronfel
Copy link
Member Author

We've got a hotfix in for 8.0.200 servicing and 8.0.300, but we should have some more usable knob. Moving this to the next milestone as a result.

@baronfel baronfel modified the milestones: 8.0.300, 8.0.400 Apr 16, 2024
@DamianEdwards
Copy link
Member

@baronfel is a fix for this in 8.0.1xx?

@baronfel
Copy link
Member Author

No, I'm not sure why I didn't backport that far originally. Folks using 1xx can use the nuget packages for a workaround now, however.

@baronfel
Copy link
Member Author

I kicked a backport off that I can get servicing approval for over email.

@baronfel
Copy link
Member Author

Backport is dotnet/sdk#41294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Registries Tasks/Issues around communicating with asset registries
Projects
None yet
Development

No branches or pull requests

4 participants