In http2, the read timeout of the request holding _read_lock
applies to all overlapping requests
#950
Unanswered
nmlorg
asked this question in
Potential Issue
Replies: 1 comment 1 reply
-
I think this helps illuminate that we’ve got a little bit of misdesign here, and should look at migrating |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi again.
I think the read timeout of the request that won the
_read_lock
lottery applies to all overlapping requests:👍
👍
👎 — the timeout was ignored for the second request (it should have thrown an exception around t=593, but instead returned a response at t=1140).
I believe this is just because
HTTP2Connection._receive_events
blocks while trying to acquire_read_lock
forever (so when Thread-1 callsself._network_stream.read(self.READ_NUM_BYTES, 20)
while holding_read_lock
, Thread-2 has to wait up to Thread-1's request's 20-second timeout).👎 — Thread-2 should have been happy to run until t=20093, but was killed at t=598.
I believe this is because any time
HTTP2Connection._read_incoming_data
gets any exception, it saves it asself._read_exception
(and reraises), and ifself._read_exception
is set when it begins, it just immediately raises it.Am I messing something up, or should I put together another
xfail
test for this, or should I let you catch up first 🙂?Beta Was this translation helpful? Give feedback.
All reactions