On Thu, 08 Sep 2005 15:05:11 -0600 "Jeff Ross" <[EMAIL PROTECTED]> wrote:
> I posted the following message to misc@ last May 31 but got no > replies. The problem has gotten worse, even though I've now raised > > kern.maxfiles=16384 > kern.maxvnodes=16384. Don't forget to make sure your login.conf lets apache have as many fds as you think it needs too. Also, you know your apache better than we do, where are those files going? Use fstat and find out. If its TCP sockets, then you probably want to turn down apache's keepalive settings so it doesn't hold so many open sockets for such a long time. > But, I'm just plucking these numbers from air. Can someone point me > in the general vicinity of a procedure to correctly size these and > other parameters? This is a moderately busy web server, but its > load is increasing. The only person that can point you to the right size for you is you. sysctl kern.nfiles will tell you how many files are open, fstat will let you find out what has them open and why. You will have to figure out from there how many fds you really need, or if something is leaking fds, or just leaving them open too long. > I saw in the archives that this would be a temporary fix unless I > brought the file usage pigs under control. In our case this morning, > the pig was httpd with over 1200 open files. Stopping and restarting > apache dropped that down to 168, but in the last hour that number had > already grown to 324. I'm headed to the apache docs to see if I can > figure out how to keep apache under control, but any pointers there > would be greatly appreciated, too. Its not necessarily a temporary fix, if you just need 6000 open files on your system, then raising it above 6000 will solve it. But if something is leaking fds, then it will only delay the problem showing up. If you're sure its apache using all the fds, then its just an apache question, not an openbsd question. There's lots of apache tuning docs out there that should mention turning down or even disabling keepalives to use fewer fds. But you will need to set MaxRequestsPerChild if apache is actually leaking fds (from some module perhaps?). Adam

