On 08/02/12 01:52, Joost Roeleveld wrote: > On Wednesday, August 01, 2012 10:41:41 AM Michael Orlitzky wrote: >> Is there a blessed method these days for setting the ulimit per-daemon? >> >> The best I've been able to do is a global setting in /etc/rc.conf: >> >> rc_ulimit="-s 1048576" >> >> The entries under /etc/security seem to be ignored when using >> `/etc/init.d/foo start`. > > Michael, > > I had to change the "nofiles" ulimit setting for my webserver. For that, I > simply added the settings to the following file: > > # cat /etc/security/limits.conf | grep apache > apache hard nofile 4096 > apache soft nofile 4096 > > I would expect the same to work for any other daemon? >
I thought so too, but it doesn't seem to be working (for any daemon, I even tried with apache just now). Can you `cat /proc/<pid>/limits` on one of those apache processes? I get whatever was set for my bash shell rather than what I have in limits.conf.