Welcome! Log In Create A New Profile

Advanced

Re: increasing open files limit

March 17, 2014 01:40AM
On Mon, 2014-03-17 at 00:53 -0400, bignginxfan wrote:
> I am trying to increase the limit on open files for nginx. I've set cat
> /proc/sys/fs/file-max to 1000000, set worker_rlimit_nofile to 8388608 but I
> still keep getting errors like:
>
> setrlimit(RLIMIT_NOFILE, 8388608) failed (1: Operation not permitted)
> accept4() failed (24: Too many open files)
>
> How do I increase the limit on open files for nginx?
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,248426,248426#msg-248426
>
In /etc/sysctl.conf or a conf file in /etc/sysconfig.d

fs.file-max = 1000000

and run /etc/sysctl -p /etc/sysctl.conf

in /etc/security/limits.conf

www-data soft nofile 500000
www-data hard nofile 800000

( assuming nginx is running as www-data ).

However, check your figures... setting max to a million open files, then
trying to set rlimit_nofile to 8 million is never going to work! I
suggest 800k should be plenty.


Steve

--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

increasing open files limit

bignginxfan March 17, 2014 12:53AM

Re: increasing open files limit

GreenGecko March 17, 2014 01:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready