Skip to content

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

Closed
@giantryansaul

Description

@giantryansaul

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:
http://stackoverflow.com/questions/30033516/single-session-multiple-post-get-in-python-requests

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions