Subject: RE: "Too many open files" hang in 1.3 and 1.3.3
To: None <port-i386@netbsd.org>
From: Gunnar Helliesen <gunnar@bitcon.no>
List: port-i386
Date: 02/23/1999 21:07:39
Thilo Manske wrote:
>
> > How do I fix this?
> 1. Increase the maximal number of filedescriptors. This can be done at
> runtime with "sysctl -w kern.maxfiles=<number>" or by increasing the
> 2. Find the server that opens so many files, sockets etc.
> (squid? apache? (wu-)ftpd? samba? inn? named?) and upgrade to a newer
After some observations I found that using sysctl(8) to set
kern.maxfiles to 13336 (twice the default @ maxusers set to 128) did the
trick.
On this particular system fstat(1) reports ~900 open files immediately
after boot. Under medium load the number hovers ~5000. The biggest
consumers of open files are wu-ftpd and httpd. There are around 85 ftpd
processes and 80 httpd processes active on the system.
The number of open files doesn't seem to "run away" at any point, it can
climb to almost 6000 and then sink to 5000 again.
These numbers don't really mean much to me, do they seem excessive to
anyone?
I'm running the latest version of Apache (1.3.4) but wu-ftpd could do
with an upgrade. I'll try that and see what happens.
Thanks to Thilo and Zdenek Salvet for helpful suggestions and pointers!
Gunnar
--
Gunnar Helliesen | Bergen IT Consult AS | NetBSD/VAX on a uVAX II
Systems Consultant | Bergen, Norway | '86 Jaguar Sovereign 4.2
gunnar@bitcon.no | http://www.bitcon.no/ | '73 Mercedes 280 (240D)