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

HTTP/3: When curl sends request to server, and server takes the initiative to close the connection, then curl will hang and get the CURLE_OPERATION_TIMEDOUT error #6606

Closed
bachue opened this issue Feb 14, 2021 · 3 comments
Labels

Comments

@bachue
Copy link
Contributor

bachue commented Feb 14, 2021

I did this

Use libcurl(compiled with quiche) to send more than 10000 h3 requests to one nginx server with quiche h3 patch

I expected the following

All requests are successful to be responded.

But actually some of requests will get CURLE_OPERATION_TIMEDOUT error. I did some debug and realized the nginx server takes the initiative to close the connection via APPLICATION_CLOSE frame(according the nginx h3 patch, one connection could only receive at most 1000 requests, then nginx will close it). Then quiche would receive this frame and set the draining timer, and curl would call Curl_Expire to expire the connection, and finally the request still be timed out.

curl/libcurl version

v7.75.0 with quiche

operating system

Linux 0a60a6fa8cdb 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 x86_64 x86_64 GNU/Linux

@bagder bagder added the HTTP/3 h3 or quic related label Feb 14, 2021
@bagder bagder changed the title When curl sends http3/quiche request to server, and server takes the initiative to close the connection, then curl will hang and get the CURLE_OPERATION_TIMEDOUT error HTTP/3: When curl sends request to server, and server takes the initiative to close the connection, then curl will hang and get the CURLE_OPERATION_TIMEDOUT error Feb 14, 2021
@bagder
Copy link
Member

bagder commented Feb 14, 2021

Is that 1000 requests limit due to the infamous http2_max_requests setting or is there a corresponding one for h3 now? Ie can you force it to happen after say 5 requests to make this easier to reproduce and debug?

@bachue
Copy link
Contributor Author

bachue commented Feb 14, 2021

@bagder It's a corresponding one for h3, and the source is here: https://github.com/cloudflare/quiche/blob/master/extras/nginx/nginx-1.16.patch#L4391

Now I can change it to 2^31-1 requests to walkaround this bug.

@bagder
Copy link
Member

bagder commented Feb 14, 2021

http3_max_requests is thus the name of the config item that is set to 1000 by default (which begs the question why, but that's not really relevant here).

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

No branches or pull requests

2 participants