Hi David, I'm using Active State 5.6.1 build 631 on NT 4.
This problem appears to be connected to the level of network traffic. But two things stand out. The files are on average only 12K, and the previous process had it's problems, but not this one. It was running on the same box, but was using JAL (a horrible language to code in for anything over 3 lines) in the 24x7 scheduler. When the transfers work (which I'm glad to see they have been all night) they only take seconds. Thanks, Peter |---------+----------------------------> | | "David O'Dell" | | | <[EMAIL PROTECTED]| | | .com> | | | | | | 04/02/2003 06:30 | | | PM | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Re: Net::FTP in Passive mode hangs and fails (really frustrating) | >--------------------------------------------------------------------------------------------------------------| Are you using this on a unix or NT box? The reason I ask is that I a similar script running on both a linux and an NT box. On the linux box the transfers (both put and get) are fine but on my NT box it drags on forever. 5 minutes on linux and over an hour on NT. [EMAIL PROTECTED] wrote: >Hi All, > >I'm unsure what to do next. I hope someone has beaten this before and >hears my cry for help. > >I've implemented a script to transfer files to a client, and to pick files >up. There is a firewall, though I don't know much about it. I instantiate >the Net::FTP object with Passive => 1. > >The transfers are running several times a day. Some of them are hanging. >The client may get a zero byte file before the process drops. We may get >the file, but the job wont recognize this and errors out. > >I know that's a pretty vague description of the problem, but I don't know >much more to add. The scripts are really very simple. In essence: > > > my $ftp = Net::FTP->new($server, Passive => 1); > > $cnt = 0; > while( ! $ftp->login($login, $password) ){ > $cnt++; > if ( $cnt >= 3 ){ > # error handling stuff > exit -1; > } > sleep (2); > } > > $ftp->binary; > > $cnt = 0; > while ( ! $ftp->put($localfile,$remotefile)){ > $cnt ++; > if ( $cnt >= 3 ){ > # error handling stuff > exit -2; > } > sleep (2); > } > > $cnt = 0; > while (! $ftp->ls($remotefile) ){ > $cnt++; > if ( $cnt >= 3 ){ > # error handling stuff > exit -3; > } > sleep (2); > } > > $ftp->quit(); > > >In this case a put might hang (on the way back it's the get's chance). > >Not surprisingly, jobs on our intranet have no such problems. > >Any help welcome! > >TIA >Peter > > > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]