24: Too many open files

Richard Kearsley Richard.Kearsley at m247.com
Sat Apr 2 00:58:52 MSD 2011

Thank you, I will try this.

-----Original Message-----
From: Igor Sysoev [mailto:igor at sysoev.ru] 
Sent: 01 April 2011 21:49
To: nginx at nginx.org
Subject: Re: 24: Too many open files

On Fri, Apr 01, 2011 at 04:08:30PM +0000, Richard Kearsley wrote:
> Hi
> Thanks for the reply.
> The only references to worker in my config are:
> worker_processes  4;
> events
> {
>     worker_connections  4096;
> }
> I read in nginx wiki if worker_rlimit_nofile is not defined, the value from ulimit -n is used?

"ulimit -n" sets/shows the limit of you current login session.
If you run nginx in this session, it will inherit this value.
If it run at bootstrap or something else the limit may be other.
The simplest way is to set it in nginx.conf:

worker_processes  4;
worker_rlimit_nofile   100000;

Igor Sysoev

nginx mailing list
nginx at nginx.org

More information about the nginx mailing list