ulimit in the ubuntu package

Sergey Budnevitch sb at waeme.net
Tue Jun 4 12:30:40 UTC 2013


On 4  Jun2013, at 15:39 , pablo platt <pablo.platt at gmail.com> wrote:

> Hi,
> 
> I'm using the ubuntu package from nginx.org.
> 
> In the package from the official ubuntu repo, you can set file descriptor limit by changing /etc/default/nginx
> # Check if the ULIMIT is set in /etc/default/nginx
> if [ -n "$ULIMIT" ]; then
>     # Set the ulimits
>     ulimit $ULIMIT
> fi

ulimit without flags sets max file size in blocks, not file descriptor limit, so
you may fill a bug in their bug tracker.


> Is there a reason this setting is missing from the nginx.org package?
> 
> I increased the limit but checking /proc/<pid>/limits still shows the default.
> Should it be enough to set the soft and hard nofile limits in /etc/security/limits.conf
> or do I have to set ulimit $ULIMIT in the init.d script?

You may add worker_rlimit_nofile  in nginx.conf (http://nginx.org/r/worker_rlimit_nofile).

> 
> Are there plans to use upstart instead of init.d script?

No. I will try to wait until either systemd or upstart win. :-)


More information about the nginx mailing list