in reply to Using multiple threads that save files across a network

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.

  • Comment on Re: Using multiply threads that save files across a network