Re: [CentOS] Processes launched from rc*.d and ulimit -n

2014-05-09 Thread James Pearson
Mitch Patenaude wrote: I'm running fedora directory server on some boxes in a multi-master arrangement. The problem is that when dirsrv is lauched from init (on boot) the maximum number of allowed file descriptors (ulimit -n) is only 4096. That means that the slapd process can only accept

[CentOS] Processes launched from rc*.d and ulimit -n

2014-05-08 Thread Mitch Patenaude
I'm running fedora directory server on some boxes in a multi-master arrangement. The problem is that when dirsrv is lauched from init (on boot) the maximum number of allowed file descriptors (ulimit -n) is only 4096. That means that the slapd process can only accept ~4k connections, and it

Re: [CentOS] Processes launched from rc*.d and ulimit -n

2014-05-08 Thread Mitch Patenaude
The value for nofile for all users in /etc/security/limits.conf (and limits.d/*) is 65536, and as soon as I restart the process (service dirsrv restart) it comes up with ulimit -n being 64K, the way it's supposed to. Why isn't it doing this at boot? I figured out part of this: limits.conf

Re: [CentOS] Processes launched from rc*.d and ulimit -n

2014-05-08 Thread Stephen Harris
On Fri, May 09, 2014 at 12:06:15AM +, Mitch Patenaude wrote: I figured out part of this: limits.conf is read by pam_limits.so, so until you log in, it isn't effective. I don't have an elegant solution, but my hackish solution so far is just to put a ulimit -n 65536 into the init script.