-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Broken timeout system with ws_connect #8444
Labels
Comments
I'm going to try to submit a fix. |
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
5 tasks
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
Please see aio-libs#8445 for the source PR
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 7, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
Please see aio-libs#8445 for the source PR
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
…eouts Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout` or `receive_timeout`, whichever are specified. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `ws_timeout` with `None` treated as 'no timeout', i.e. the maximum. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
Added read_timeout property to ResponseHandler to allow override After WS(S) connection is established, adjust `conn.proto.read_timeout` to be the largest of the `read_timeout` and the `ws_connect`'s `timeout.ws_receive` with `None` treated as 'no timeout', i.e. the maximum. fixes aio-libs#8444
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
Please see aio-libs#8445 for the source PR
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
Please see aio-libs#8445 for the source PR
arcivanov
added a commit
to arcivanov/aiohttp
that referenced
this issue
Jun 8, 2024
… not respecting ws_connect's timeouts aio-libs#8444 Please see aio-libs#8445 for the source PR
bdraco
added a commit
that referenced
this issue
Jul 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Context
We have very specific requirements with our HTTP connections: we expect extremely responsive API and reconnect rapidly if we don't receive responses because we consider it a potential failure.
To facilitate that we use
ClientTimeout(connect=1.5, sock_connect=1.0, sock_read=0.5)
, i.e. yes, if we attempt to read on a socket after sending the request and nothing arrives in 500 ms we consider it a failure and perform a retry.Problem
This actually works great except when we use the
ws_connect
for websockets. Having nothing to read for 0.5s ofsock_read
results in aServerTimeoutError
requiring to retry withws_connect
.Problem, however, is that
ws_connect
'stimeout
andreceive_timeout
have no effect on the underlying timeout configuration because_ws_connect
's call toself.request
does not alter the receive timeout for the connection by callingconn.protocol.set_response_params
. And after the WSS connection is established, disregarding thews_connect
'sreceive_timeout
the protocol inherits the parent's HTTP connection'ssock_read
of 0.5.To Reproduce
Above
Expected behavior
receive_timeout
passed to thews_connect
should be observed, by callingconn.protocol.set_response_params
withreceive_timeout
asread_timeout
Logs/tracebacks
Python Version
N/A
aiohttp Version
Latest stable
multidict Version
N/A
yarl Version
N/A
OS
OS-independent
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: