-
-
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>2.0.3 streaming api critical bug #1981
Comments
Cannot reproduce. |
@asvetlov @Rybak5611
The result as below: https://gist.github.com/asvetlov/0cc167d03fd1e77516d67e23fa8d1ebc |
As i wrote this affects only aiohttp>2.0.3 and only interation over content. My guess is that it has smth to do with Also this bug semi-reproducible, may also depend on network connection and OS. |
Hangs and timeouts for me too. Environment: ubuntu 16.04, python 3.6.0, aiohttp 2.1.0 |
google.com works fine but http://www.dabeaz.com/ stucks on my laptop, so I've reproduced the issue.
Maybe the bug is flaky and depends on many conditions (not including OS/network but also server's reverse proxy setup etc.) @fafhrd91 I did not investigate it further. Would you take a look? The problem is really very serious and it is scaring me. I thought aiohttp client is very stable. |
Ok, will during weekend |
await aiohttp.request(..) is used #1981
should be fixed in master, we have to make release @asvetlov I added comment that explain the problem. but technically normal session usage can be affected with the same bug. here is example: def get(url):
return ClientSession().get(url) proper fix for this bug would be to store reference to session in ClientResponse object. then we can delete |
Keeping in response a reference to session looks pretty fine to me. |
could you work on fix? |
Sure |
I was having a similar issue (timeout errors) using this code: with aiohttp.ClientSession(loop=asyncio.get_event_loop()) as session:
response = await session.get("...")
chunk = await response.content.readany() Using session = aiohttp.ClientSession(loop=asyncio.get_event_loop())
response = await session.get("...")
chunk = await response.content.readany() Maybe it's not the same problem, but this comment might help somebody. |
|
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
Critical bug, affecting aiohttp>2.0.3
Expected behaviour
Reading page/file content line by line with
Actual behaviour
Loop hangs until interpreter raises
concurrent.futures._base.TimeoutError
errorSteps to reproduce
Your environment
Tested on Windows 10 build 15063, Debian 8
Python 3.6
aiohttp>2.0.3
Traceback ( aiohttp 2.1.0 )
The text was updated successfully, but these errors were encountered: