Connect only times out after 4x the specified timeout #2987
Unanswered
JelleZijlstra
asked this question in
Potential Issue
Replies: 1 comment 2 replies
-
|
As far as I can tell default client used by I have seen something similar own some systems of my own, but I cannot yet rule out that I have misconfigured the connection pool, or the pool gets poisoned by idle connections being kept alive. |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
I am observing that if I set a timeout of N seconds and httpx is unable to connect to the requested URL, the timeout only happens after 4 * N seconds.
I used the following example script:
And I consistently see numbers like this:
Relevant versions:
(Also saw this on 3.9.)
Possibly it's trying 4 times and applying the 1 s timeout every time, but as a user I'd expect that if I say the timeout is 1 s, the call will definitely complete within 1 s (plus some small overhead).
Beta Was this translation helpful? Give feedback.
All reactions