bmckenzie has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks. I've found that I cannot upload more than four files at a time to my web hosting service using Net::FTP. (Actually, I'm using the simplified interface Net::FTP::Simple with ActiveState Perl on WinXP).

There's no similar limitation using FileZilla. File size doesn't seem to be the issue -- it's just the quantity.

What happens is, the first four files get uploaded, then a temp file for the fifth is created, and then, nothing.

Just wondering if anyone else has run into this and has some troubleshooting tips.

Thanks for the help.

  • Comment on Limit to number of files uploaded with Net::FTP

Replies are listed 'Best First'.
Re: Limit to number of files uploaded with Net::FTP
by ww (Archbishop) on Apr 30, 2007 at 13:30 UTC
    Have you read the fine print in your service's Terms of Service?

    Some firms -- mostly those catering to relatively low demand useage, like family web sites -- have astonishingly tight restrictions on transfers, simultaneous sessions and the like.

    And you may also be well served to compare the ways FileZilla handles multiple transfers, as variation between FZ's and Net::FTP::Simple's methods might be useful

    Or, of course, this may be entirely irrelevant, but one can hope it might be some help.

Re: Limit to number of files uploaded with Net::FTP
by sgifford (Prior) on Apr 30, 2007 at 15:51 UTC
    Can you create a very short script that shows the problem? Maybe it's something like old handles aren't being closed properly, so the FTP server sees you as having 4 simultaneous connections.

    Also, you can turn on debugging for Net::FTP to see exactly what's going on. That might give a useful clue.

    One more idea: As a workaround, you could try my module Net::FTP::AutoReconnect, which will automatically re-establish your FTP connection if it fails for some reason. I created it to deal with some quirky, unpredictable FTP servers, and it might help in your case.

    Good luck!

Re: Limit to number of files uploaded with Net::FTP
by derby (Abbot) on Apr 30, 2007 at 14:59 UTC

    Well ... given that XP (service pack 2) limits you to 10 connections per second (and ftp in active mode makes two connections - you may get 8-10 connections in passive mode), I'm wondering if FileZilla is really making more than 4 active connections (8-10 passive connections?) and just queuing the rest.

    -derby
Re: Limit to number of files uploaded with Net::FTP
by blue_cowdawg (Monsignor) on Apr 30, 2007 at 14:08 UTC
        Just wondering if anyone else has run into this and has some troubleshooting tips.

    I have a script at my day job that uploads roughly 100 files via FTP from a Win2K box to another Win2K box and it has never displayed the bad behavior your are describing. As ww pointed out you may want to check the other end of the connection. Sounds like a limit the receiving server has.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg