$ftpClient = Net::FTP->new( $FTP_server, Timeout => $my_timeout, # etc. );
The only thing is, the default is 120 seconds, so unless the server is up but really, really slow (not *too* slow!) I don't see how it could be hanging. Can you give us some more code? I also suggest adding Debug => 1 (or possibly higher) to the constructor and look at the debugging output.
HTH,
Paul.
On Monday, July 21, 2003, at 07:45 AM, G.B.Evans wrote:
Hi all,
I'm having a problem with FTP, where the remote site is only partially available and the connect/login/put/get doesn't report an error and doesn't time out.
This leads to the situation where a hanging run on a Friday evening locks up the whole process until the following Monday, when it can be manually cleared; however, in the meantime, the transactions from Friday, Saturday & Sunday have all been blocked and we haven't met our SLA.
What I should like to be able to do is to put a timeout value on the connect/login/put/get operation, to force it to timeout after (say) 10 minutes - is there a simple way of doing this ?
These are the relevant calls that are being used :
use Net::FTP;
$ftpClient = Net::FTP->new($FTP_server);
$return_value = $ftpClient->login($FTP_username, $FTP_password);
$return_value = $ftpClient->put($fn);
$return_value = $ftpClient->get($fn, $uniqueLocalname);
Any suggestions would be much appreciated.
Geoff.
____________________________________________
Geoff Evans Technical Consultant Talis Information Ltd. Birmingham Research Park Vincent Drive Birmingham Phone +44 (0)121 471 1179 B15 2SQ Fax +44 (0)121 472 0298 United Kingdom E-Mail [EMAIL PROTECTED]
[...]
-- Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan [EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/