On Thu, May 6, 2010 at 4:48 PM, Keith <ke...@scott-land.net> wrote:
> Hi, I am having trouble increasing the openfile limit in a default install
> run Pound (reverse http proxy)  stably without it stopping at random times
> (Always seems to be the weekend) and to do that I need to crank up the
> openfile limit.
...
> I've done "sysctl kern.maxfiles=3000" for example but if I do a ulimit -n
> after I get a different result although I can't remember what it was
> I also tried editing the sysctl.conf file and put the kern.maxfiles entry
in
> there but had similar results !

You probably don't need to touch this.  Indeed, you *lowered* it:

$ sysctl kern.maxfiles
kern.maxfiles=7030
$

Note the kern.maxfiles is the upper-bound on open files in the
*entire* system and not a limit on the number of file descriptors in a
process!  You don't need to touch that unless/until you get ENFILE
errors.


> I've edited the login.conf file and changed the staff, default and the
> daemon entries eg :openfiles-cur=2222:\ and then rebooted but the highest I
> could get the openfile limit to is 1024

This is the right place, you just didn't consider the -cur vs -max
distinction.  By default, openfiles-max=1024.  If you want cur to be
2222 then you need to either raise both (by just setting
openfiles=2222) or explicitly set openfiles-max to at least 2222.


Philip Guenther

Reply via email to