debugging "Too many open files"

Alex Polite m2 at
Thu Sep 19 10:46:27 EDT 2002

On Wed, Sep 18, 2002 at 11:23:32PM +0200, Martin v. Loewis wrote:
> Alex Polite <m2 at> writes:
> > I'm getting the "Too many open files" error.
> What "the" error? An exception? A message in the system log? An SMS
> on your mobile phone?  

Well first there's a loud voice in my head telling me to eat Christian
babies and right after that my python program says 
"OSError: [Errno 24] Too many open files" 
or sometimes 
"IOError: [Errno 24] Too many open files: '/proc/mounts'" and exits.

> I recommend you list /proc/<pid of python program>/fd/
Thanks. This tells me that some of my processes have a LOT of files
open, most of them pointing to /dev/hdc. Is this normal?

Alex Polite

More information about the Python-list mailing list