On 2010-05-06, Keith <ke...@scott-land.net> wrote:
> Hi, I am having trouble increasing the openfile limit in a default 
> install of OpenBSD 4.6 x64 from the default setting of 128 to say 5000. 
> I want to 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 think Pound runs with the following 
> account settings.... Type=deamon, user = _pound , group= _pound

If you start it from a shell, it uses the class for the account you've
logged in as.

If you start it from /etc/rc.local, unless you do something with su or
sudo, it uses the class daemon.

So you need to adjust openfiles-cur for the class of the account you're 
starting it from. If starting it from a shell, make sure you use a new
login shell after adjusting this.

> I know that if I do a ulimit -n 10000  the limit get's set at maximum of 
> 7030. I don't know if doing this change effects other users and I am 
> pretty sure it doesn't survive a reboot.

This limit is from kern.maxfiles sysctl. Either adjust it with sysctl(8)
or edit sysctl.conf and reboot to change this.

> I've done "sysctl kern.maxfiles=3000" for example but if I do a ulimit 

This is lowering things from the default (7030), at least on i386
and amd64.

Reply via email to