Subject: Re: URGENT: Why is this happening?
To: Jon Ribbens <jon@oaktree.co.uk>
From: Rick Byers <rickb@iaw.on.ca>
List: netbsd-help
Date: 10/08/1997 16:56:46
There is a hard limit on the total number of open files.  Either you have
some sort of run-away process opening files and not closing them, or your
system is just heavily loaded beyond what your kernel expects.  Use the
fstat command to find out what files are open, and what processes is
responsible.  If it's a run away process (i.e. if squid has hundreads of
files open for no good reason), then you'll have to deal with that
software.  You can give it a resource limit (so that it'll just fail to
open too many files), or see if there is a patched/updated version of it.

If, on the other hand, you just have a really loaded web server with lots
of CGI's etc... You can increase MAXUSERS in your kernel config file and
recompile.  This will make a bigger File table.  Consult the options(4)
man page for a little more detail.  I've had to increase the file table
size beyond what it expects (we have over 100 virtual hosts) by setting
MAXUSERS=64, and NPROC=2048 (to increase NPROC, I think I had to do a bit
of source code modification).

Hope this helps,
	Rick

 On Wed, 8 Oct 1997, Jon Ribbens wrote:

> We have a NetBSD 1.2.1 machine running squid, Apache and BIND.
> The /var/log/messages file is filling up with messages such as:
> 
> Oct  8 11:50:07 deimos syslogd: /var/run/utmp: Too many open files in system
> Oct  8 11:50:07 deimos last message repeated 3 times
> Oct  8 11:50:07 deimos /netbsd: file: table is full
> Oct  8 11:50:07 deimos last message repeated 14 times
> 
> Why is it doing this and how can we fix it?
> 
> Cheers
> 
> 
> Jon
> ____
> \  //    Jon Ribbens    // 10MB virtual-hosted // www.oaktree.co.uk
>  \// jon@oaktree.co.uk // web space for 49UKP //
> 

=========================================================================
Rick Byers                                      Internet Access Worldwide
rickb@iaw.on.ca                                		     System Admin
University of Waterloo, Computer Science                    (905)714-1400
http://www.iaw.on.ca/rickb/                         http://www.iaw.on.ca/