Subject: Re: a problem when downloading sftp

Re: a problem when downloading sftp

From: Patrik Thunström <>
Date: Fri, 26 Aug 2011 11:15:50 +0200

Daniel Stenberg skrev 2011-08-26 08:47:
> It turns out this code very frequently fails for me, indicating a
> problem in the sftp_read() function. I'm working on it, but I thought
> I'd let you in on it...
> I'm downloading a 700K text file from localhost for my test and it
> fails in more than 50% of the cases. The sympthom of the failure is
> that not the entire file is transferred. A few K of the end is never
> read by the application.
Yup, this seems quite similar to the issues that I reported on the curl
mailing list in the end of may.
At that time I didn't manage to find the time to write any test case
which triggered it using libssh2 only, and the main issues which made us
look for a newer version of libssh2 was already solved in 1.2.7 which
worked just fine for us.

But, to chime in with my experiences from my testing at that time; the
sweet spot seems to be slightly above 740kB in our environment (win32
build running on 64 bit windows 7), at which point we have roughly 50%
chance of success. Just going up a few kB greatly lowers the rate of
success, and when you're at 760-770kB I've never even once managed to
get the file to transfer successfully.

In case you need any help in testing out potential fixes I'll gladly
help you verify on the windows platform.

Best regards
Patrik Thunström /

Received on 2011-08-26