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

Increase ulimits for docker containers. #132

Closed
wants to merge 1 commit into from
Closed

Increase ulimits for docker containers. #132

wants to merge 1 commit into from

Conversation

agcooke
Copy link
Contributor

@agcooke agcooke commented Dec 24, 2018

Issue #, if available:

Description of changes:
Increase the default ulimits for containers.

We see that on some of our (monolith) apps we run out of file-descriptors. This increases the limit from 1024 to 2048 for soft-limits. The values for the limits are just chosen, we did not research what they should be. We have not had issues with file-descriptors since making the change.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@micahhausler
Copy link
Member

default-ulimits is not available in Docker 17.03: https://docs.docker.com/v17.03/engine/reference/commandline/cli/

@agcooke
Copy link
Contributor Author

agcooke commented Jan 10, 2019

In the install_workers docker 17.06 is used. I can verify if it works on a 17.06 AMI built with these setting, doing this locally does make me think it does work:

$ ./dockerd -v     
Docker version 17.06.0-ce, build 02c1d87
$ ./dockerd -h | grep ulimit
Flag shorthand -h has been deprecated, please use --help
      --default-ulimit ulimit                   Default ulimits for containers (default [])

@micahhausler Let me know if I should do that or are you against increasing the ulimits?

@agcooke
Copy link
Contributor Author

agcooke commented Jan 10, 2019

Here is the link to the 17.06 dockerd docs

and the 17.03 dockerd docs.

They both support the default-ulimits flag. I have not verified if it works with 17.03/06 but have done in on 18.06. I am willing to do that verification if it helps.

@micahhausler
Copy link
Member

Thanks for the doc links. Have you been able to get 17.06 to work with the ulimits set in the config file? Every time I try to set that config file option I get:

unable to configure the Docker daemon with file /etc/docker/daemon.json: \
    the following directives don't match any configuration option: default-ulimits

@agcooke
Copy link
Contributor Author

agcooke commented Feb 1, 2019

OK, I did not verify it, so if you did it must not be possible. Sorry for the inconvenience!

The pull request cannot be merged until the default docker version is updated for everybody.

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

Successfully merging this pull request may close these issues.

2 participants