Lots of 2009/09/27 00:49:21 [alert] 22383#0: accept() failed (24: Too many open files)
Payam Chychi
pchychi at gmail.com
Sat Sep 26 21:20:43 MSD 2009
On Sat, Sep 26, 2009 at 8:59 AM, Jason Kim <highclass99 at gmail.com> wrote:
> Hello,
>
> I'm using nginx to send static files and reverse proxing to an apache of the
> same server for serving PHP files.
>
> I'm getting a large amount of 500 internal server errors and
> Lots of
> 2009/09/27 00:49:21 [alert] 22383#0: accept() failed (24: Too many open
> files)
> in my nginx error logs when visitors peak.
>
> nginx.conf includes
> user apache apache;
> worker_processes 12;
> worker_connections 1024;
>
> accessing stub_status says
> Active connections: 625
> server accepts handled requests
> 233130990 233130990 400847438
> Reading: 8 Writing: 10 Waiting: 607
>
> right now but was about Active connections was about 1200 when getting the
> errors
>
> [root at firewall2 ~]# cat /proc/sys/fs/file-max
> 372684
> [root at firewall2 ~]# ulimit -a
> core file size (blocks, -c) 0
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 77824
> max locked memory (kbytes, -l) 32
> max memory size (kbytes, -m) unlimited
> open files (-n) 200000
> pipe size (512 bytes, -p) 8
> POSIX message queues (bytes, -q) 819200
> real-time priority (-r) 0
> stack size (kbytes, -s) 10240
> cpu time (seconds, -t) unlimited
> max user processes (-u) 77824
> virtual memory (kbytes, -v) unlimited
> file locks (-x) unlimited
>
> I see no reason I should be bumping into the file open limits.
>
> Anyway know why I'm getting the errors?
> Thanks.
I believe the ulimit is for the current user logged in with the active
session, you will want to modify the ulimit settings for the user that
runs your process
--
Payam Tarverdyan Chychi
Network Security Specialist / Network Engineer
More information about the nginx
mailing list