EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Upload of files to WS_FTP fails sometimes

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#10984
Posted: 09/08/2009 09:23:22
by Frank Munsberg (Standard support level)
Joined: 06/04/2009
Posts: 47

Again I'm encountering some strange Errors with WS_FTP 7.1 server and SBB 7.1.0.160.
When I try to upload like 3000 small files (~1kb) I'm getting some errors.
The way this interacts with the SFTP Server is by opening a connection, looping through the files for uploading, calling UploadFile and then ListDirectory for verification. At the end the connection is closed again.

Error 1: "End Of File" quite often an .UploadFile or a .ListDirectory will fail with "End Of File" and Code 4
the connection stays open and the upload of the next files continues. Most of the time, this results in a 0-byte filesize on the server for the uploaded file.

Error 2: "SFTP Component not connected" Code 6 which seems to happen during a call to .ListDirectory and also to .UploadFile. This error seems to happen when there are close to 3000 files in the remote folder.
When this happens, the connection is effectively closed and all further files fail to transfer in this run.
Sometimes (not always) this seems to trigger a Protocol error in the Server log stating the following:

Code
<![CDATA[System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at GetUserPerms(IFTPHost* , IFTPPermissionSet* , IFTPUser* , Char* )
   at UtilAPI.User.GetPermission(PermissionSet pPermSet, String pFileName)
   at SSHServerAPI.SFTP.Subsystem.FXP_Readdir()
   at SSHServerAPI.SFTP.Subsystem.DispathPacket()]]>


I am not sure, if this can cause the SSH Daemon of WS_FTP to crash but can't deny the possibility either. In our production environment this error also occurs sometimes and lately the Daemon has crashed several times.
Back in the days where there was no SBB accessing the server things were reportedly a bit more stable.

The Settings of the TElSimpleSFTPClient are as follows:

Code
.AutoAdjustTransferBlock = false;
.PipelineLength = 1;

other settings are left at their default values

Increasing the PipelineLength to something high like 32 will crash the SSH daemon for sure, that was something we tested back a while ago so I've left it to 1.


Is there a way to get rid of the errors, maybe with different settings on the client?

Regards
Frank
#11000
Posted: 09/09/2009 11:15:58
by Ken Ivanov (EldoS Corp.)

Quote
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt

Yes, the server seems to have problems with correct memory management. I have sent a message to WS_FTP developers earlier this year regarding the stability of their product, but got no response from them. Hope they will fix these things in one of the closest builds, as they are really critical.

I have re-checked the changes history and found out that WS_FTP-related workarounds have been implemented in 7.1.161. I suggest you to upgrade to the latest build (7.1.163). Once upgraded, the issues you reported should have gone. Please remember to switch AutoAdjustTransferBlock back to true after upgrading to make the component use the workarounds.

Reply

Statistics

Topic viewed 2426 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!