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

support/http - Added default WriteTimeout of 30s to HTTP server #4796

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stellarsaur
Copy link
Contributor

See this issue for full context.

30 seconds seems like a reasonable default to account for large payloads and network congestion.

@stellarsaur stellarsaur self-assigned this Mar 7, 2023
@stellarsaur stellarsaur linked an issue Mar 7, 2023 that may be closed by this pull request
@stellarsaur stellarsaur requested a review from a team March 7, 2023 18:19
Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I think it'd be worthwhile to discuss this in the team meeting tomorrow because we have a lot of existing timeouts and this one needs to be bigger than all of them. For example, we kill DB requests after 10s and web requests after 30s, I think? So it's possible that this timeout needs to be higher, e.g. 45s. And others might have more thoughts. Can you add an agenda item?

@@ -25,7 +25,7 @@ func TestRun_setupDefault(t *testing.T) {

assert.Equal(t, defaultShutdownGracePeriod, srv.Timeout)
assert.Equal(t, defaultReadTimeout, srv.ReadTimeout)
assert.Equal(t, time.Duration(0), srv.WriteTimeout)
assert.Equal(t, defaultWriteTimeout, srv.WriteTimeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't wrong, but it also doesn't verify that for a non-zero config value, the same value is being set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP Setup: Default WriteTimeout
3 participants