Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
requests.exceptions.ConnectionError: ('Connection aborted.', ResponseNotReady('Request-sent',)) #273
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:
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!
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.
@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.