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

Sensible default for NGINX_WORKER_CONNECTIONS #28

kykc opened this issue Feb 26, 2017 · 2 comments

Sensible default for NGINX_WORKER_CONNECTIONS #28

kykc opened this issue Feb 26, 2017 · 2 comments


Copy link

@kykc kykc commented Feb 26, 2017

Regarding nginx worker connections limit, as defined here:

Querying ulimit from inside the container:

root@abc201f5e274:/# ulimit -n

I don't think it's rather sensible default value, as it greatly affects memory footprint: on 8-thread processor I got 8 workers each consuming 404MiB of RES memory for nginx alone, which is quite excessive IMO.

In any case, I think it's a good thing to mention that this option greatly affects memory consumption of the container in


Can't find info about docker run behavior when --ulimit is not present, but seems that docker sets such ulimit inside all containers on my host for some reason. On the host itself ulimit has pretty usual value:

kykc@yes:~$ ulimit -n
Copy link

@ShockwaveNN ShockwaveNN commented Feb 27, 2017

You can use env variables:
NGINX_WORKER_PROCESSES - to set nginx worker process
NGINX_WORKER_CONNECTIONS - to set max connetion for each worker
Also you can change ulimit by docker --ulimit key - see
We will add info about that in manuals, thanks.

Copy link

@agolybev agolybev commented Feb 27, 2017

Added nginx params description. See Available Configuration Parameters section for details.

@agolybev agolybev closed this Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants