24: Too many open files

Igor Sysoev igor at sysoev.ru
Sat Apr 2 00:48:54 MSD 2011


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
http://sysoev.ru/en/



More information about the nginx mailing list