-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Quic connection idle timeout kicks in while HTTP/3 request is in progress #87478
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionThis is related to the missing Quic KeepAlive option issue I reported a while ago: #70090. Because Quic doesn't provide an option to enable keep alive, an HTTP/3 request can fail while being processed by the server if the Quic connection idle timeout kicks in. I'm attaching a test case that demonstrates this. This test case shows a number of issues:
Reproduction Steps
Expected behaviorNo exceptions, the PUT request should succeed. Actual behaviorThe PUT request fails with the following exception:
Kestrel shows a critical error:
Regression?No response Known WorkaroundsNo response Configuration.NET SDK: Runtime Environment: Host: .NET SDKs installed: Other informationNo response
|
Triage: I just retested this with H/2 and HTTP 1.1 and it doesn't fail there. We should fix this for H/3. However, the test is very artificial, setting up idle connection lifetime as low as 1s and having server pause for 5 seconds with the reply doesn't seem like realistic scenario. Workaround for this is not to set idle connection lifetime so low. Therefore Future for now. For the QUIC pings, we could reuse existing H/2 settings https://learn.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler.keepalivepingtimeout?view=net-7.0 and pass it to |
Allowing to configure keep alive through the Also, if the idle timeout is not set and keep alive are disabled, how will an HTTP/3 client figure out that the Quic connection is dead? For example the HTTP/3 client sends a GET request and waits for the response. If the connection link dies before the response is sent, won't the client hang indefinitely? Or is there a specific request timeout implemented at the HTTP level that handles this scenario? The HTTP/3 spec also specifies that clients are expected to keep the Quic connection open while there are request/push in progress: https://datatracker.ietf.org/doc/html/rfc9114#name-idle-connections |
I didn't mean that we shouldn't do #70090, just that we should fix this regardless of it. We might need to implement it to fix this though.
Anything called on that connection will fail, i.e. the next request will fail and the connection gets scrapped.
There is request timeout by default. What I think should be the goal of this issues is that if there's a request on a connection, we never kill the connection until the request is done (which might happen to be request timeout). How is that achieved should be implementation detail hidden from the user (from HttpClient perspective) as this should behave the same for all HTTP versions. |
Description
This is related to the missing Quic KeepAlive option issue I reported a while ago: #70090.
Because Quic doesn't provide an option to enable keep alive, an HTTP/3 request can fail while being processed by the server if the Quic connection idle timeout kicks in.
I'm attaching a test case that demonstrates this. This test case shows a number of issues:
PooledConnectionIdleTimeout
property is used to configure theQuicConnection
idle timeout. To me these properties are unrelated.keepalive.zip
Reproduction Steps
Expected behavior
No exceptions, the PUT request should succeed.
Actual behavior
The PUT request fails with the following exception:
Kestrel shows a critical error:
Regression?
No response
Known Workarounds
No response
Configuration
.NET SDK:
Version: 7.0.302
Commit: 990cf98a27
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: ubuntu.22.04-x64
Base Path: /home/vagrant/dotnet/sdk/7.0.302/
Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61
.NET SDKs installed:
7.0.302 [/home/vagrant/dotnet/sdk]
Other information
No response
The text was updated successfully, but these errors were encountered: