Locust: Locust throwing connection error failures

Created on 28 Jul 2017  Â·  6Comments  Â·  Source: locustio/locust

i have this simple node server i'm running locally and running a locust file from a container pointing at node. whenever i run from the container i get this error:
'''ConnectionError(MaxRetryError("HTTPConnectionPool(host=\'123.123.123.123\', port=8000): Max retries exceeded with url: /icecream.txt (Caused by NewConnectionError(\'

And it's not caused by the open file limit i checked and that seems ok. also when i run the same test locally instead of a container i dont encounter the same issue

Most helpful comment

Same issues.I've found the way to solve this problem.

According to https://github.com/locustio/locust/issues/92.

add these to ur code to solve it

import resource
resource.setrlimit(resource.RLIMIT_NOFILE, (10240, 9223372036854775807))

It's caused by the open file limit.The real reason is that your locustfile wasn't respecting the limit settings.
U can add these to find the issue

import resource
print resource.getrlimit(resource.RLIMIT_NOFILE)

All 6 comments

Same issues.I've found the way to solve this problem.

According to https://github.com/locustio/locust/issues/92.

add these to ur code to solve it

import resource
resource.setrlimit(resource.RLIMIT_NOFILE, (10240, 9223372036854775807))

It's caused by the open file limit.The real reason is that your locustfile wasn't respecting the limit settings.
U can add these to find the issue

import resource
print resource.getrlimit(resource.RLIMIT_NOFILE)

This is what i get when i print the resource limit (1048576, 1048576), so i'm not sure that's the reason the tests are failing @BlinkMo

i Still get these errors:
HTTPSConnectionPool(host='host', port=443): Max retries exceeded with url: /the/url/?version=2017-05-26 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Operation timed out',))

it seems to timeout for some reason

Solved it. it was a docker issue.

hey @broulaye how you solve it? i have the same error too when i try test HTTPS site.

Thanks/

Solved it. it was a docker issue.

@broulaye I know its been over two years, but any chance you remember what the resolution was for the Docker issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gboorse picture gboorse  Â·  3Comments

foxracle picture foxracle  Â·  3Comments

radiantone picture radiantone  Â·  3Comments

meeech picture meeech  Â·  4Comments

ShaolongHu picture ShaolongHu  Â·  3Comments