Skip to content

Sensible default for NGINX_WORKER_CONNECTIONS #28

@kykc

Description

@kykc

Regarding nginx worker connections limit, as defined here:

Querying ulimit from inside the container:

root@abc201f5e274:/# ulimit -n
1048576

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 README.md

Update

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
1024

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions