Page 1 of 1

SFTP Download errors on files > 100k

Posted: Fri 08 May 2020 18:37
by corneliusd
I've been using SecureBridge for several years in many applications for both uploading and downloading on both FTP and SFTP sites and love the product. Recently, it was reported to me that an application I wrote that has been working fine for small files suddenly started getting errors when it tried to download any file of 100k bytes or larger from an SFTP site. These are XML files and trying to download the exact same files using WinSCP works just fine.

The download attempt generates two errors:
  • EScError with "Connection timeout expired"
  • EScError with "Cannot send data to server"
I'm at a loss of what to do. I left the parameters of the SFTPClient component at default but after getting these errors, I tried changing several things and nothing helped. The errors happen immediately, there is no waiting (more than about a half a second)--it's certainly not anywhere close to the 15 second default timeout in the component.

I'm using ScBridge 9.1.3 in Delphi XE2 and the application is a Windows 32-bit app.

Any clues on what to try would be appreciated.

David Cornelius

Re: SFTP Download errors on files > 100k

Posted: Wed 13 May 2020 18:35
by corneliusd
Does anyone have any suggestions as to what to try to resolve the SFTP problem? It might be a server parameter. It might be that I have to hook up some Indy component. I really don't know. My searches have turned up nothing but perhaps I'm looking for the wrong thing.

I may have to drop embedded file upload/download support in my applications and shell out to WinSCP or some other FTP client app....

Re: SFTP Download errors on files > 100k

Posted: Thu 14 May 2020 11:54
by ViktorV
To solve the problem, please try to set the ScSFTPClient.ReadBlockSize and ScSFTPClient.WriteBlockSize properties first to 64512 and then to 32768 and then to 16384 and so on.

Re: SFTP Download errors on files > 100k

Posted: Thu 14 May 2020 15:24
by corneliusd
Thank you SO MUCH! This solved the problem--and I would not have thought that would've affected it.

David.

Re: SFTP Download errors on files > 100k

Posted: Fri 15 May 2020 11:18
by ViktorV
Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.