Good evening Salva, I am seeing the same problem. Every 50GB or so the SFTP connection will drop, retrys are not successful. scp an sftp work correctly, even in parallel to this activity so it looks like it is a Net::Foreign issue. Environment:
matt@aslan:185% cat /etc/redhat-release Fedora release 22 (Twenty Two) matt@aslan:186% perl -v This is perl 5, version 20, subversion 3 (v5.20.3) built for x86_64-li +nux-thread-multi (with 16 registered patches, see perl -V for more detail) ... matt@aslan:187% perl_module_version Net::SFTP::Foreign Net::SFTP::Foreign : 1.75 matt@aslan:188%
I see no relevant detail in the ssh logs during the failure:
... debug3: Ignored env DISPLAY debug3: Ignored env SGI_ABI debug1: Sending subsystem: sftp debug2: channel 0: request subsystem confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: subsystem request accepted on channel 0 # got it!, len:95, code:2, id:-, status: - Error: Connection lost (Connection to remote server is broke +n) Resuming transfer (retry 1) # queueing msg len: 71, code:17, id:1973 ... [1] # waiting for message... [1] # queueing msg len: 83, code:3, id:1974 ... [2] # waiting for message... [2] debug2: channel 0: read<=0 rfd 4 len 0 debug2: channel 0: read failed debug2: channel 0: close_read debug2: channel 0: input open -> drain ...
The error and resuming lines above was generated by this perl, the rest was from -vvv:
emit(" Error: " . $connect->status . ' (' . $connect->error . ')',
emit() is just a wrapper around print STDERR; return undef; The code whole paragraph is:
for (my $pass=0; $pass < $_max_retries; $pass++) { if ($connect->put($local, $remote, %$options)) { my $stat = $connect->stat($remote); $size = $stat->size; main::add2Log(" Finished $size of $lsize bytes", 'i +nfo') if ($main::debug >= 1 and $pass); $main::progressBar = 100; return 1; } main::append2Log("\b"x$_fll, ' 'x$_fll, "\b"x$_fll) unless (main::is_graphical()); emit(" Error: " . $connect->status . ' (' . $connect->error . ')', " Resuming transfer (retry " . ($pass+1) . ')') +; my $connect = sshConnect($url, $user, $password, 'sftp', undef +, 1, 1); return undef unless ($connect); }
The whole run sans debug looks like:
Uploading marilyn/photos/1108BlueRidge/Original/CRW_2030.tif + Error: Connection lost (Connection to remote server is broke +n) Resuming transfer (retry 1) Error: Connection lost (Connection to remote server is broke +n) Resuming transfer (retry 2) Error: Connection lost (Connection to remote server is broke +n) Resuming transfer (retry 3) Error: Connection lost (Connection to remote server is broke +n) Resuming transfer (retry 4) Retries exceeded - failed to send '/Website/www/html/marilyn/p +hotos/1108BlueRidge/Original/CRW_2030.tif' Uploading marilyn/photos/1108BlueRidge/Original/CRW_2031.crw
What detail can I collect to help diagnose? Matt

In reply to Re^3: Net::SFTP::Foreign frequent connection server stall by littlelion
in thread Net::SFTP::Foreign frequent connection server stall by Anonymous Monk

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.