Re: nginx.conf file limits

2014-04-26 Thread johnw
Hi, I found another simple way to do that, add the limit to /etc/login.conf (nginx, php_fpm), use /etc/rc.d/daemon script to start nginx,php_fpm nginx:\ :maxproc=0:\ :tc=daemon: php_fpm:\ :maxproc=0:\ :tc=daemon: because the parent is runas root, and root can brea

Re: nginx.conf file limits

2014-04-25 Thread Stuart Henderson
On 2014/04/21 19:10, Johnw wrote: > Hi, would you like to add RLIMIT_NPROC setting to nginx.conf? > > Because I do not want/need nginx child run any command/fork > so, I want set RLIMIT_NPROC=0 to nginx child process, but nginx ignore > /etc/login.conf setting. While I think this is a nice idea,

Re: nginx.conf file limits

2014-04-21 Thread Johnw
Hi, would you like to add RLIMIT_NPROC setting to nginx.conf? Because I do not want/need nginx child run any command/fork so, I want set RLIMIT_NPROC=0 to nginx child process, but nginx ignore /etc/login.conf setting. Thank you. Index: src/core/nginx.c ===

Re: nginx.conf file limits

2014-04-13 Thread Ted Unangst
On Sun, Apr 13, 2014 at 22:24, Stuart Henderson wrote: > These values make sense to me, though I think some people didn't like > daemons themselves changing rlimit when this came up before, so we added > a login.conf section when this was needed for bgpd (handled by rc.subr > setting the class auto

Re: nginx.conf file limits

2014-04-13 Thread Theo de Raadt
>> Index: nginx.conf >> === >> RCS file: /cvs/src/usr.sbin/nginx/conf/nginx.conf,v >> retrieving revision 1.18 >> diff -u -p -r1.18 nginx.conf >> --- nginx.conf 27 Mar 2014 10:40:42 - 1.18 >> +++ nginx.conf 13 Apr

Re: nginx.conf file limits

2014-04-13 Thread Stuart Henderson
On 2014/04/13 16:56, Ted Unangst wrote: > Recently had a bit of an issue with the default nginx.conf and running > out of files. By default, login.conf imposes a limit of 128 files, > which is not nearly sufficient to process the configured 1024 > connections. > > We need to fix two things. First,

Re: nginx.conf file limits

2014-04-13 Thread Theo de Raadt
> Recently had a bit of an issue with the default nginx.conf and running > out of files. By default, login.conf imposes a limit of 128 files, > which is not nearly sufficient to process the configured 1024 > connections. Right. > We need to fix two things. First, raise the file limit to 1024. > S

nginx.conf file limits

2014-04-13 Thread Ted Unangst
Recently had a bit of an issue with the default nginx.conf and running out of files. By default, login.conf imposes a limit of 128 files, which is not nearly sufficient to process the configured 1024 connections. We need to fix two things. First, raise the file limit to 1024. Second, lower the con