The ouptut you're getting with $ssh2->scp_get($old, $new) differs quite markedly from what I get. I'm running with $ssh2->debug(1);, and I gather you're doing the same ?

My particular code segment, which is doing the job fine, is as follows:
for(@files) { $ret = $ssh2->scp_get("$dir/$_", "$_"); print "RET: $ret\n"; }
My @files contains 6 filenames, and the output that segment produces is:
libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 506, ext = 0) - read 506 bytes - read 506 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1 libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 500, ext = 0) - read 500 bytes - read 500 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1 libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 499, ext = 0) - read 499 bytes - read 499 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1 libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 507, ext = 0) - read 507 bytes - read 507 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1 libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 570, ext = 0) - read 570 bytes - read 570 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1 libssh2_scp_recv(ss->session, path, &st) -> 0x3dae38c Net::SSH2::Channel::read(size = 493, ext = 0) - read 493 bytes - read 493 total Net::SSH2::Channel::read(size = 1, ext = 0) - read 1 bytes - read 1 total Net::SSH2::Channel::DESTROY RET: 1
I'm thinking it's the Net::SSH2::Channel::DESTROY that occurs between successive scp_get() calls that might be critical. I'm using Net-SSH2-0.19 (built against libssh2-1.0).

I haven't tried grabbing large numbers of files - and if I did, then faik I might well strike exactly the same problem as you.

Cheers,
Rob

In reply to Re: Net::SSH2 fails under heavy load by syphilis
in thread Net::SSH2 fails under heavy load by FloydATC

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.