Forum: NGINX strange 'too many open files' errors with nginx 0.6.32

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8d19cff584474db887c6d6a2af9eb955?d=identicon&s=25 Arash Ferdowsi (Guest)
on 2008-11-17 11:54
(Received via mailing list)
hi,i'm seeing a strange 'too many open files' error with nginx (which
I'm
sure many of you have seen before):

2008/11/17 02:15:02 [alert] 21748#0: accept() failed (24: Too many open
files) while accepting new connection on 67.228.78.114:80

strangely enough, I have the following line in /etc/security/limits:
* hard nofile 524288

and ulimit -n returns the same number. I have 2 workers set to a max
of 262144 connections. upon receiving that error (and after
past occurrences) I've run lsof and gotten < 10k sockets. additionally,
I
have a nearly identically configured machine (running twisted) where
each
process is handling ~15k connections. so I'm a loss as to what's going
on
here (and suspect some subtle bug in nginx or in my server
configuration.
any help would be greatly appreciated!
8d19cff584474db887c6d6a2af9eb955?d=identicon&s=25 Arash Ferdowsi (Guest)
on 2008-11-17 12:00
(Received via mailing list)
oh, and one more thing, restarting nginx seems to fix everything (until
the
error pops up again a day or so later :-)
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2008-11-17 12:03
(Received via mailing list)
Hi there,



Add

worker_rlimit_nofile 10240;

to your nginx configuration should fix this problem



Regards,



Glen Lumanau



From: owner-nginx@sysoev.ru [mailto:owner-nginx@sysoev.ru] On Behalf Of
Arash Ferdowsi
Sent: 17 Nopember 2008 17:50
To: nginx@sysoev.ru
Subject: Re: strange 'too many open files' errors with nginx 0.6.32



oh, and one more thing, restarting nginx seems to fix everything (until
the
error pops up again a day or so later :-)

On Mon, Nov 17, 2008 at 2:48 AM, Arash Ferdowsi <arash@getdropbox.com>
wrote:

hi,

i'm seeing a strange 'too many open files' error with nginx (which I'm
sure
many of you have seen before):



2008/11/17 02:15:02 [alert] 21748#0: accept() failed (24: Too many open
files) while accepting new connection on 67.228.78.114:80



strangely enough, I have the following line in /etc/security/limits:

* hard nofile 524288



and ulimit -n returns the same number. I have 2 workers set to a max of
262144 connections. upon receiving that error (and after past
occurrences)
I've run lsof and gotten < 10k sockets. additionally, I have a nearly
identically configured machine (running twisted) where each process is
handling ~15k connections. so I'm a loss as to what's going on here (and
suspect some subtle bug in nginx or in my server configuration. any help
would be greatly appreciated!




--
Arash Ferdowsi
CTO, Dropbox
913.707.5875 (m)
This topic is locked and can not be replied to.