SFTP Download errors on files > 100k

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
corneliusd
Posts: 24
Joined: Thu 21 Dec 2006 08:45
Location: Portland, OR
Contact:

SFTP Download errors on files > 100k

Post by corneliusd » Fri 08 May 2020 18:37

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

corneliusd
Posts: 24
Joined: Thu 21 Dec 2006 08:45
Location: Portland, OR
Contact:

Re: SFTP Download errors on files > 100k

Post by corneliusd » Wed 13 May 2020 18:35

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....

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SFTP Download errors on files > 100k

Post by ViktorV » Thu 14 May 2020 11:54

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.

corneliusd
Posts: 24
Joined: Thu 21 Dec 2006 08:45
Location: Portland, OR
Contact:

Re: SFTP Download errors on files > 100k

Post by corneliusd » Thu 14 May 2020 15:24

Thank you SO MUCH! This solved the problem--and I would not have thought that would've affected it.

David.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SFTP Download errors on files > 100k

Post by ViktorV » Fri 15 May 2020 11:18

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.

Post Reply