HTTP2 Stream ID Conflict Occurs with ConnectionPool During Multi-threaded Concurrent Usage #993
Unanswered
chenlcme
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I submit HTTP2 requests concurrently using multiple threads through ConnectionPool, an error occurs. An analysis of the logs reveals that multiple threads are using the same stream ID, leading to an error returned by the server.
example:
the key logs:


I reviewed the source code of _sync.http2.HTTP2Connection and h2.connection.H2Connection. H2Connection states that it is not thread-safe, and I found the following code block has concurrency issues。I think the code block for acquiring a new stream ID needs to be locked.

Beta Was this translation helpful? Give feedback.
All reactions