requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',)) #273

giantryansaul opened this Issue May 4, 2015 · 3 comments


None yet

4 participants


I wanted to offer this up not as an issue, but as a solution to one that I found today.

I had a test that when run on a specific server would always fail with this unhelpful message:
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',))

The test had multiple requests to the same client within a single task and a colleague suspected it was something to do with the connection from the first request not being properly closed.

After a lot of playing around with timeouts and attempting to close out the first connection before the next one was sent (both of which did not solve the issue), I found a stackoverflow article with the same issue:

The quick and dirty solution was to update to requests 2.7.0. At the time of getting this error I was on 2.6.2. I also noticed that the default version for locust is on 2.4. If you are experiencing this issue, simply update to 2.7 and you should be good!

Horcrux commented Aug 17, 2015

Huh, I had this same error in my own program. I simply followed this guide on updating to 2.7.0. Thanks for the tip!


Hi @giantryansaul

Would the pip request dependency be dependant on the version of python? A 'pip install locustio' on python 2.7.10 seems to give me 'python-requests/2.7.0'. I say this, as I have been logging request headers.

'User-Agent': 'python-requests/2.7.0 CPython/2.7.10 Linux/3.10.0-229.el7.x86_64'

@aidylewis Looking at the fix from @cgoldberg the library requirements are specified as requests>=2.4.1 and not requests=2.4.1, so your pip request may have simply found 2.7.0 as the best match with python 2.7.10. That is about the extent of my pip knowledge though.

@justiniso justiniso added the bug label Apr 2, 2016
@cgoldberg cgoldberg closed this in #401 Apr 2, 2016
@justiniso justiniso referenced this issue Apr 28, 2016

v0.7.4 #407

@justiniso justiniso added this to the 0.7.4 milestone Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment