-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Timeout exception when reading a response body #4015
Comments
You're using a 30-second timeout. What did you expect to happen instead? |
I don't expect to get the timeout error when I read a response body. Example: [requests.get('http://localhost:8080/test/', params=params) for i in range(150)] It works fine Aiohttp.client example: [test(value) for i in range(150)]
TimeoutError ... It craches |
I think this is by design. The timeout is applied to the whole client session, not just to exchanging headers. |
Plz fix the indentation in your snippet: it's unclear whether your if-blocks are in the async CM or not. |
@webknjaz Thanks for explaining. |
I am struggling with same issue now. |
Has anyone figured out how to resolve this error? |
The If you have an issue while the ClientSession is still open, it is not this issue. Search for another issue or create a new one. |
I have this problem after 2000-3000 requests via aiohttp. I tried to return json from the fetch function instead of the request object itself, but the error did not disappear. I solved it with the help of backoff. |
Long story short
Hello
I have a strange issue with
aiohttp.client
, sometimes when I try to read a response body, it crashes by timeout.My function:
Traceback:
Steps to reproduce
resp = asyncio.run(test("test"))
Your environment
aiohttp==3.5.4
python3.7.3
The text was updated successfully, but these errors were encountered: