-
-
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
HTTP response not released with raise_for_status=True #3364
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #2782 (Unsolicited response received on idle HTTP channel starting with "\r\n"; err=), #3248 ( |
Fixed by #3365 |
Long story short
When using ClientSession with
raise_for_status=True
, HTTP responses are not released. This means the related TCP connection will remain inCLOSE_WAIT
state indefinitely, when the called server returns an error status code and a large body. Eventually, these waiting connections will hit the connection limit and cause timeout errors on ALL open connections.Expected behaviour
When using Client Session with
raise_for_status=True
, TCP connections are released properly and they are either closed or reused (depending on keep alive configuration).Actual behaviour
When using Client Session with
raise_for_status=True
, the TCP connectionsSteps to reproduce
client.py
Dockerfile
Commands:
Your environment
aiohttp 3.4.4
Python 3.6.6
Debian 9.5
The text was updated successfully, but these errors were encountered: