HTTP/2 in parallel is not working #1966
|
Code: When I try the following code (to a server that needs http/2), I'm getting if you uncomment the funny part, it then fails with: So it looks like either I'm doing something completely lame, or there are 2 problems here. For the record, if I do the await on every client.get/post call, it works but it is super slow.. |
Replies: 3 comments 8 replies
|
Okay, I'm not able to look into this right this second, but something that stands out to me here is...
Perhaps it's possible that you're accessing an HTTP/2 only service, that's not performing the HTTP/1.1-or-HTTP/2 negotiation, and needs to instead be forced to HTTP/2.
Something that this does help illuminate is that it'd be super helpful if we had good tooling for being able to properly inspect the complete flow of HTTP/2 frames in both directions. (Eg. "Max outbound streams is 1" seems surprising) I've also got a bit of a niggling feeling that perhaps the server is enforcing a stream-concurrency cap, that we're not actually honouring. |
|
So for the record, here is the small example that reproduces the problem on my side: Not that depending on how many tasks are run in parallel, it might work. 4 work all the time, 8 or 10 works like 50% of times. Here is the stack trace when it fails: |
|
Ok, so I updated to the latest httpcore (master). I've seen some docs changed and some more interesting made by you @tomchristie |
Okay, I'm not able to look into this right this second, but something that stands out to me here is...
Perhaps it's possible that you're accessing an HTTP/2 only service, that's not performing the HTTP/1.1-or-HTTP/2 negotiation, and needs to instead be forced to HTTP/2.
http1=False, http2=True)TooManyStreamsError?Something that this does help illuminate is that it'd be super helpful if we had good tooling for being able to properly inspect the complete flow of HTTP/2 frames in both directions. (Eg. "M…