First of all I suspect that the issue is not with perl but with the system call you are using. You did not tell us what utility you are using so all further advice will be speculation.

My guess is that that there are n connections being made with the destination machine (n being number of threads) and that the utility is not meant to be used in multiple threads to connect to the same machine. This could result in timeouts.

Possible Fix #1:Possibly set up a scheme where you are caching the files locally and only making one connection with the destination machine. (if you can reliably make more connections then send 2 files at once). The idea being that you can keep downloading the files in multiple threads and then transfer them in fewer.

Possible Fix #2: Eliminate the middle man. Have the destination machine grab the large files itself.


In reply to Re: Using multiply threads that save files across a network by zek152
in thread Using multiple threads that save files across a network by Smile-n-Nod

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.