I said I'd get back to you on Monday ... it's Wednesday now but what the hell... OK I set the values, just as you said, with
sudo sysctl -w net.inet.tcp.recvspace=40960

Etc., but it doesn't seem to have made any difference.

The upload takes just over two minutes for a one-line text file.

But I turned on Debugging in Net::FTP -- should have done that before, shouldn't I? And found something interesting.

Net::FTP=GLOB(0xfc84)>>> ALLO 5 Net::FTP=GLOB(0xfc84): Timeout at ftptest.pl line 17 Net::FTP=GLOB(0xfc84)>>> PASV Net::FTP=GLOB(0xfc84)<<< 227 Entering passive mode (202,6,74,98,243,97 +) Net::FTP=GLOB(0xfc84)>>> STOR adsf.txt Net::FTP=GLOB(0xfc84)<<< 125 Data connection already open; Transfer st +arting. Net::FTP=GLOB(0xfc84)<<< 226 Transfer complete.

It seems it's trying to do a non-passive transfer, (line 17 is the "put()" command), timing out after two minutes, then issuing the PASV command and doing it instantly ... what's that all about?

Update: I issued the PASV command myself before the "put()" command, but it made no difference. It still timed out and then did its own PASV command.

Update-Update: I realised a couple of seconds ago that I could just set the timeout to some low value and it would instantly time out then move on to the PASV thing. But I'd still like to know what's going on...



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print

In reply to Re^4: Net::FTP takes a very long time in Passive mode by Cody Pendant
in thread Net::FTP takes a very long time in Passive mode by Cody Pendant

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.