Subject: Re: Time to bump the default open files limit?
To: Andrew Brown <atatat@atatdot.net>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 06/20/2002 16:17:53
In message <20020620183733.A11267@noc.untraceable.net>Andrew Brown writes
>c'mon...this is unix, dudes.  :)

... And when your clever shell pipeline itself fails due to ENFILE?

No reason to be quite so glib, if you haven't actually encountered the
problem.  (I didnt recall fstat(1), but I did try similar hacks with
lsof.  IIRC, failure due to hitting ENFILE, is exactly what I got.)

In Jason's scenario, if a daemon encouters EMFILE or ENFILE, even
syslog(3) may fail, or syslogd could run into ENFILE problems of its
own.  In which case there's no log message and (as Jason said)
ENFILE/emfile is something you have to *think* to check for.

I'm not dumb. Jason isn't dumb. This really can be quite frustrating
to identify, and (for ENFILE) to diagnose a culprit from amongst
several candidates.