-
-
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
aiohttp client timeout does not work #3175
Comments
isn't it supposed to be: async with AsyncTimeout():
... |
Ok, I find in aiohttp
In |
Yes, the limitation is driven by performance reasons. Short timeouts make no sense for network operations in practice, think about network latency, bridge hardware slowdowns, and other things. Given that asyncio itself is not real-time system at most 1 second delay for timeout reporting is perfectly fine I think. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
I use
ClientTimeout(total=0.1
to process request that takes 0.5 seconds and no exception is raised.Expected behaviour
I expect to raise exception in 100% times
Actual behaviour
Sometimes it raise exception (
concurrent.futures._base.TimeoutError
), sometimes it works and ignores timeout option:By looking at TRACE object it is clear that request takes more time than specified in
ClientTimeout(total=
optionSteps to reproduce
python3 test.py
Script test.py to run:
trace.py module:
Your environment
OS: Linux air 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64 GNU/Linux
python: 3.5.3
aiohttp: 3.3.2
The text was updated successfully, but these errors were encountered: