Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Increasing the number of open files by docker process. #466

Merged
merged 3 commits into from
Aug 5, 2014

Conversation

nuxlli
Copy link
Contributor

@nuxlli nuxlli commented Aug 2, 2014

With the more extensive/intensive use of docker on day-to-day activity, this error might occur:

$ tail -f /var/log/docker.log
2014/07/02 20:40:15 http: Accept error: accept unix /var/run/docker.sock: too many open files; retrying in 1s
2014/07/02 20:40:16 http: Accept error: accept tcp [::]:2375: too many open files; retrying in 1s

This pull request has the goal of increasing docker's open file limit, avoiding this error.

@@ -31,6 +31,9 @@ start() {
EXTRA_ARGS="$EXTRA_ARGS -s $DOCKER_STORAGE"
fi

# Increasing the number of open files by docker process
ulimit -n 10000

This comment was marked as spam.

This comment was marked as spam.

@SvenDowideit
Copy link
Contributor

I was thinking we should make sure it can be set using an ENV var on the persistent disk too

@tianon
Copy link
Contributor

tianon commented Aug 4, 2014

@SvenDowideit the Docker numbers were chosen to be high enough that they wouldn't need to be changed any time soon, which is why none of the upstream init scripts have them as configurable knobs; can you think of a use case where the number provided wouldn't be high enough?

@nuxlli
Copy link
Contributor Author

nuxlli commented Aug 4, 2014

Discussions about setting it through ENV aside, I made an update to the default values and added support to configure it through ENV :)

@@ -31,6 +32,10 @@ start() {
EXTRA_ARGS="$EXTRA_ARGS -s $DOCKER_STORAGE"
fi

# Increasing the number of open files by docker process
ulimit -n $DOCKER_FILES_ULIMIT
ulimit -u $DOCKER_FILES_ULIMIT

This comment was marked as spam.

This comment was marked as spam.

@tianon
Copy link
Contributor

tianon commented Aug 4, 2014

LGTM

@SvenDowideit
Copy link
Contributor

very excellent, thank you very much LGTM

SvenDowideit pushed a commit that referenced this pull request Aug 5, 2014
Increasing the number of open files by docker process.
@SvenDowideit SvenDowideit merged commit 0546c23 into boot2docker:master Aug 5, 2014
@SvenDowideit
Copy link
Contributor

mmm, this does not appear to have worked.

cpuguy83 pushed a commit to cpuguy83/boot2docker that referenced this pull request Aug 26, 2014
Increasing the number of open files by docker process.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants