You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing this to track the issue in urllib3 -- urllib3/urllib3#1234. Whenever urllib3 merges a fix, requests should update its requirements to avoid leaking connections.
The issue is that some servers -- in my case, Amazon S3 -- will set "Transfer-Encoding: chunked" even in response to a HEAD request. This results in urllib3 not returning the connection to the connection pool after requests calls stream() to get the content.
Here is a small script I wrote to confirm the problem (with a hacky reach into the pool).
In the case of google.com, the pool size is 10 upon completing the request, as the connection is put back. In the case of contacting Amazon, the pool size is 9. The default pool size is 10 and that's what we expect to get back.
Here's the debug information from the interaction, along with the requests version used:
Filing this to track the issue in urllib3 -- urllib3/urllib3#1234. Whenever urllib3 merges a fix, requests should update its requirements to avoid leaking connections.
The issue is that some servers -- in my case, Amazon S3 -- will set "Transfer-Encoding: chunked" even in response to a HEAD request. This results in urllib3 not returning the connection to the connection pool after requests calls
stream()
to get the content.Here is a small script I wrote to confirm the problem (with a hacky reach into the pool).
In the case of google.com, the pool size is 10 upon completing the request, as the connection is put back. In the case of contacting Amazon, the pool size is 9. The default pool size is 10 and that's what we expect to get back.
Here's the debug information from the interaction, along with the requests version used:
As far as I can tell, this bug has been present ever since the
read_chunked()
method was introduced in urllib3.Response in 1.10.3.The text was updated successfully, but these errors were encountered: