On a side note which might be related:

A coworker ran into a problem where he was creating socket connections in an eval block with an alarm() to time them out if he didn't receive a response in a certain time period. It worked really really well, he was able to speed up his code by huge amounts. Until he inexplicably started running out of FD's.

It turned out that the FD's weren't being released after timing out of the eval block, so every time it timed out he accumulated another open FD that never went away (and they were being created implicitly inside perl, actually, so he didn't even have a handle to call close() on).

I'm not sure if this is at all related to your problem, but you might want to check on it. Most systems I've played with have the number of available FD's up in the thousands, so if you really only have a few hundred open, I'd think something weird is going on if you're getting errors.

Alan


In reply to Re: resource control: FD by ferrency
in thread resource control: FD by powerman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.