Too many open files

Discussion in 'Python' started by psaffrey@googlemail.com, Feb 9, 2009.

  1. Guest

    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
    , Feb 9, 2009
    #1
    1. Advertising

  2. wrote:
    > 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

    --
    Sator Laser GmbH
    Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
    Ulrich Eckhardt, Feb 9, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Collin VanDyck

    (Too many open files)

    Collin VanDyck, Oct 13, 2003, in forum: Java
    Replies:
    5
    Views:
    2,855
    Collin VanDyck
    Oct 14, 2003
  2. Cathy  Hui
    Replies:
    6
    Views:
    9,039
    Wiseguy
    Mar 4, 2005
  3. bond
    Replies:
    1
    Views:
    3,177
    Mark Jeffcoat
    Jun 28, 2007
  4. bond
    Replies:
    3
    Views:
    22,387
  5. Dag Sunde
    Replies:
    4
    Views:
    344
Loading...

Share This Page