-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed
Labels
Description
Discussed in #16080
Originally posted by denizsokmen January 24, 2025
I wasn't sure to create this as an issue, as I also haven't dived into it myself. I use multi interface with libcurl 8.9.1 and nghttp2 1.63.0, I have a typical loop in a thread that takes requests, does curl_multi_perform, processes messages, calls curl_multi_poll to avoid busyloop. I noticed that in some of the HTTP/2 requests, curl_multi_poll returns immediately with no numfds set, hundreds of times just to send 80KB of data at the end. There's simply no activity on any sockets until the last step where 80KB data is finally sent:
STATE: DO => DID handle 0x12ea30a00; line 2237
STATE: DID => PERFORMING handle 0x12ea30a00; line 2355
curl_multi_perform running handles: 1, numfd after multi_poll: 1, timeout: 1000
multi changed, check CONNECT_PEND queue
...
hundreds of these spammed in just a few milliseconds:
curl_multi_perform running handles: 1, numfd after multi_poll: 0, timeout: 0
...
finally:
curl_multi_perform running handles: 1, numfd after multi_poll: 1, timeout: 1000
upload completely sent off: 83671 bytes
In summary, something is setting the timeout to 0 in http/2 requests, turning the downloader thread into a busyloop. Is this normal?