Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locust throwing connection error failures #638

Closed
broulaye opened this issue Jul 28, 2017 · 7 comments
Closed

Locust throwing connection error failures #638

broulaye opened this issue Jul 28, 2017 · 7 comments

Comments

@broulaye
Copy link

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('<urllib3.connection.HTTPConnection object at 0x....>: Failed to establish a new connection: [Errno 110] Operation timed out',))",),)'''

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

@BlinkMo
Copy link

BlinkMo commented Jul 31, 2017

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

According to #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)

@broulaye
Copy link
Author

broulaye commented Aug 1, 2017

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

@broulaye
Copy link
Author

broulaye commented Aug 1, 2017

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

it seems to timeout for some reason

@broulaye
Copy link
Author

broulaye commented Aug 3, 2017

Solved it. it was a docker issue.

@broulaye broulaye closed this as completed Aug 3, 2017
@setyoso
Copy link

setyoso commented Jan 12, 2018

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

Thanks/

@danroestorf
Copy link

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?

@BenBCE
Copy link

BenBCE commented Jul 13, 2021

You can pass the setting through docker run apparently.

docker run --ulimit nofile=90000:90000 <image-tag>

Found it here https://mtyurt.net/post/docker-how-to-increase-number-of-open-files-limit.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants