This comment is on not about your perl code but I have had a similar problem in the past. In my case it was due to someone putting machines which were on different subnets on the same ethernet switch and they were using the same gateway. The sql server was on one subnet and the perl was running on a machine on the other.

Short connections worked but longer connections flaked out. It turns out it was related to something realizing it could shortcut the route between the machines. It didn't work though because the routing tables on the end machines were not setup for that route. (The gateway was OpenBSD and the end machines were Linux, I don't recall the versions.)

PS: I don't know exactly what I'm talking about here but telling the Linux servers to ignore ICMP redirects seemed to make the problem go away.

In reply to Re: host does not respond; sometimes by superfrink
in thread host does not respond; sometimes by zetetes

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.