Always close implicit connector, even for keepalive responses.#79
Merged
Always close implicit connector, even for keepalive responses.#79
Conversation
Member
|
I think 'force_close' should be TCPConnector parameter. should we also introduce keep-alive timer for each opened connection, similar to what server handler does? |
Member
Author
|
About keep-alive timer -- nice to have, but timer can be implemented in another issue. |
Member
|
Agree on both |
Member
Author
|
New patch is ready. |
Member
|
Lgtm |
asvetlov
added a commit
that referenced
this pull request
Jun 22, 2014
Always close implicit connector, even for keepalive responses.
Member
Author
|
Thanks |
Member
Author
|
I think the fix worth to be published in 0.8.2 ASAP. |
Member
|
ok, i'll make release later today. |
Member
Author
|
Thank you again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If network resource returns keepalive response an implicit connection is not closed now.
That's leads to resource leaks and eventually to
OSError: [Errno 24] Too many open files.I guess to always close implicit connection and process keepalives only if explicit connector has been passed to
aiohttp.request.See http://stackoverflow.com/questions/24298095/connections-arent-closing-with-python3-asyncio-concurrent-http-get-requests/24312441?noredirect=1 as initial report for the issue