Too many open files

P

psaffrey

I'm building a pipeline involving a number of shell tools. In each
case, I create a temporary file using tempfile.mkstmp() and invoke a
command ("cmd < /tmp/tmpfile") on it using subprocess.Popen.

At the end of each section, I call close() on the file handles and use
os.remove() to delete them. Even so I build up file descriptors that
eventually give me the "too many files" error message. Am I missing
something here?

Peter
 
U

Ulrich Eckhardt

I'm building a pipeline involving a number of shell tools. In each
case, I create a temporary file using tempfile.mkstmp() and invoke a
command ("cmd < /tmp/tmpfile") on it using subprocess.Popen.

At the end of each section, I call close() on the file handles and use
os.remove() to delete them. Even so I build up file descriptors that
eventually give me the "too many files" error message. Am I missing
something here?

There recently was a bug filed at bugs.python.org about leaked file
descriptors. Maybe that is exactly what you are experiencing here.

Uli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top