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

30s default http read timeout #3182

Merged
merged 3 commits into from
Apr 22, 2024
Merged

30s default http read timeout #3182

merged 3 commits into from
Apr 22, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Apr 22, 2024

Since we're now using read timeouts and not total timeouts, we can use a lower threshold, a single read shouldn't take 5 min (and not even 10s).

The 10s value is somewhat arbitrary.

Like #3144, this is a breaking change in some sense.

Since we're now using read timeouts and not total timeouts, we can use a lower threshold, a single read shouldn't take 5 min (and not even 10s).
@konstin konstin added the enhancement New feature or request label Apr 22, 2024
@zanieb
Copy link
Member

zanieb commented Apr 22, 2024

I think we should probably use a larger value given all the problems we've seen with timeouts?

@konstin
Copy link
Member Author

konstin commented Apr 22, 2024

I can't speak for #2833, but for the top level #1912 report, a shorter timeout would be better because the stuck jobs fails earlier.

@zanieb
Copy link
Member

zanieb commented Apr 22, 2024

I guess I'd still prefer something like 30s, agree that 5 minutes is execessive.

@konstin konstin changed the title 10s default http read timeout 30s default http read timeout Apr 22, 2024
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

let default_timeout = 5 * 60;
let default_timeout = 30;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this documented anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the 5 min were previously undocumented.

It's also a bit misleading since it's not an http timeout properly, it's just a read timeout.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I don't think we'll ever want a real timeout per http request, I think a read timeout makes sense. If we expose a comprehensive timeout, I think it'd expect it to be like for an entire command invocation or installation of a package or something.

Copy link
Contributor

@samypr100 samypr100 Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth,

Poetry and Pip use 15 seconds as a default

I'll still take 30 seconds over 300 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd really like to have some data on this what real world values are

@charliermarsh charliermarsh merged commit d10903f into main Apr 22, 2024
39 checks passed
@charliermarsh charliermarsh deleted the konsti/10s-http-timeout branch April 22, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants