-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
multi curl using http2 failed when limiting max host connections #2416
Comments
How many "max concurrent streams" does the server advertise? |
these http2 configs are used (in a vhost):
|
Thanks for the added details. I've installed an nginx myself with a config using similar options. I can reproduce this problem. My slightly amended version of your code: issue-2416.c. It uses a single fixed URL and lets the user specify how many to fetch in parallel. |
Status update: There's at least two problems in libcurl that this test case shows and suffers from. (pro tip: setting
By setting I'm working on fixes for these issues. |
The error code which indicates that stream was closed because of incoming GOAWAY is REFUSED_STREAM, and it is passed to on_stream_close_callback. I admit that I haven't documented it in nghttp2 manual. |
Thanks for confirming this @tatsuhiro-t, I figured it was like that! |
When receiving REFUSED_STREAM, mark the connection for close and retry streams accordingly on another/fresh connection. Reported-by: Terry Wu Fixes #2416
When receiving REFUSED_STREAM, mark the connection for close and retry streams accordingly on another/fresh connection. Reported-by: Terry Wu Fixes #2416
we encounter something:
by setting "http2_max_requests 1;" in nginx and using libcurl (multi handle + libuv) and it gives the error Failure when receiving data from the peer (almost) every time (every 10 ~ 15 request there will be a success).
(nginx v1.12.2 with http2 module | curl v7.58.0/7.59.0 | nghttp2 v1.29).
with the same version, using curl cmd, everyting is fine.
By capture tcp packet we see that the data has finished transfering and follow by "Encrypted Alert" and FIN from server.
so i guess that it has something to do with connection reusing inside multi handle.
I managed to reproduce this problom somehow by little modifing to the exmple of multi-uv.c as shown below:
compile:
run:
when doing this i set
http2_max_requests 10;
in nginx config files.and it will produce some files with 0 sizes:
The text was updated successfully, but these errors were encountered: