timeout not work in asyncClient #2142
Unanswered
lyg4795
asked this question in
Potential Issue
Replies: 1 comment 3 replies
-
|
Any update with this discussion? timeout does not work with asyncClient and Client 🫤 |
Beta Was this translation helpful? Give feedback.
3 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 create a asyncClient by 'async with httpx.AsyncClient(proxies=proxies,timeout=2.0)as client:'
then I send a request
print("get cookie res start", f'xid{xid}')
cookieres = await client.get(url, headers=headers)
print("get cookie res ",f'xid{xid}',t-time.time())
sometimes the requests will cost more than 2s
get cookie res xid0 -4.54197096824646
and sometimes I have to wait several minutes and get an error like httpx.readError
Beta Was this translation helpful? Give feedback.
All reactions