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

net/http: don't reuse connections that are experiencing errors [1.20 backport] #60301

Open
btasker opened this issue May 19, 2023 · 1 comment
Labels
CherryPickCandidate Used during the release process for point releases
Milestone

Comments

@btasker
Copy link

btasker commented May 19, 2023

Requesting that #59690 be considered for backport into the next 1.20 minor release

Relevant change in Gerrit is https://go-review.googlesource.com/c/net/+/486156

Rationale:

When encountered, this is a serious issue: requests are blocked until the kernel gives up on the socket (with default settings on a Linux host, that's around 17 minutes). If the operator restarts the application as a result, data loss may occur.

Although the fix is in x/net v0.10.0 it will not be available to most developers who likely import net/http (and so rely on the h2 bundle rolled into Go's releases)

The only viable workaround is to disable the H2 client entirely via environment variable.

@gopherbot gopherbot added this to the Go1.20.5 milestone May 19, 2023
@seankhliao seankhliao added the CherryPickCandidate Used during the release process for point releases label May 19, 2023
@dmitshur dmitshur changed the title net/http2: don't reuse connections that are experiencing errors [1.20 backport] x/net/http2: don't reuse connections that are experiencing errors [1.20 backport] May 24, 2023
@mdempsky
Copy link
Member

mdempsky commented May 24, 2023

@neild What do you think about this?

Also, is this applicable to 1.19?

@dmitshur dmitshur changed the title x/net/http2: don't reuse connections that are experiencing errors [1.20 backport] net/http: don't reuse connections that are experiencing errors [1.20 backport] May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickCandidate Used during the release process for point releases
Projects
None yet
Development

No branches or pull requests

4 participants