Subject: RE: "Too many open files" hang in 1.3 and 1.3.3
To: None <gunnar@bitcon.no>
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: port-i386
Date: 02/22/1999 10:35:09
In message <C0C3CAAA402BD111AA1E00A024745CC3249B1A@univac.bitcon.no>
          Gunnar Helliesen <gunnar@bitcon.no> wrote:

[...]
> Feb 21 05:55:40 atlas inetd[226]: accept (for ftp): Too many open files=

> Feb 21 05:55:40 atlas inetd[226]: accept (for telnet): Too many open
> files
> Feb 21 05:55:40 atlas inetd[226]: accept (for ftp): Too many open files=

>=20
>=20
> ... and then it continues like this until it quickly fills up /var.
Something has eaten up your filedescriptors. This can happen with
unrestricted servers going wild and opening a lot of files/sockets/etc.
(Had this with squid 1.NOVM.1.don't-know-anymore about 10 months ago...)

> There aren't as many FTP connections to the machine as those messages
> would indicate, of course. It seems like inetd reaches a threshold of
> some kind, and then enters a tight loop. One telnet request at 05:55 wa=
s
> enough to make it print alternating "for ftp" and "for telnet" messages=

> until it filled up /var.
If your system doesn't have any free filedescriptors available, it
cannot open any new sockets (AFAIK). Because of that inetd fails.

> How do I fix this?
1. Increase the maximal number of filedescriptors. This can be done at
runtime with "sysctl -w kern.maxfiles=3D<number>" or by increasing the
number of users (or processes) in your config-file.

2. Find the server that opens so many files, sockets etc.
(squid? apache? (wu-)ftpd? samba? inn? named?) and upgrade to a newer
version, change the configuration, write the author etc.)
"lsof" may be of some help (it's in the package tree.)

Just a guess: This could be related to the NetBSD's SA 1999-01 (see
http://www.de.netbsd.org/Security/patches-1.3.3.html for a kernel
work-around/patch for this.)

Bye,
  Thilo.
--=20
Mir ist mein Signature entlaufen :-(. Wer es findet, sende es bitte an
Thilo.Manske@HEH.Uni-Oldenburg.DE zur=FCck. Danke!=20