EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Connection lost with Wifi

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#24917
Posted: 05/13/2013 11:03:13
by Mike Garcia (Basic support level)
Joined: 05/13/2013
Posts: 3

Hi,

I'm connecting to a server using the SimpleSFTPClient and I'm getting a Connection Lost message. Sometimes it happens in the DoSend() method and sometimes in the DoReceive() method. This only happens when I'm connecting via Wifi. Everything works fine over the ethernet. I was wondering if there are some settings that I should make to optimize the wifi connection? Perhaps some blocksize/buffer settings. Any help would be greatly appreciated.

Thanks,
-Mike
#24918
Posted: 05/13/2013 11:11:39
by Eugene Mayevski (EldoS Corp.)

The problem happens on network level (connection is lost) which neither we nor .NET Framework controls.

In general Connection Lost or Connection Reset error happens when network layer doesn't receive response to sent packets after several retransmissions. I.e. packet size or anything like that doesn't matter much.

SFTP client components support resuming, and in any case your application must be ready for any kind of network failure, so the loop with retries (in case connection is lost in the middle) is a good idea.


Sincerely yours
Eugene Mayevski
#24961
Posted: 05/16/2013 12:08:02
by Mike Garcia (Basic support level)
Joined: 05/13/2013
Posts: 3

I'm using the SecureBlackbox for C++Builder 2007 to C++Builder 2010 which I don't think is the .NET version. It appears that we do successfully send some packets and get partially through the download (file size is on the order of 40-80 MB). The server that we are connecting to is a Linux server. Are there any known issues with the VCL version and Linux?

Thanks,
-Mike
#24962
Posted: 05/16/2013 12:19:06
by Eugene Mayevski (EldoS Corp.)

The problem has nothing to do with .NET, C++Builder, Linux etc. . The problem has roots on lower levels of OSI stack, which is beyond application control. It is possible that some settings of the wi-fi driver or replacement/upgrade of the driver will solve the problem, but in any case this has nothing to do with the application layer.


Sincerely yours
Eugene Mayevski
#24963
Posted: 05/16/2013 13:42:53
by Mike Garcia (Basic support level)
Joined: 05/13/2013
Posts: 3

I just set the SftpBufferSize to 64Kb and now everything works but operates slower. Is there a way to speed it up without increasing the buffer size?
#24968
Posted: 05/16/2013 23:17:50
by Eugene Mayevski (EldoS Corp.)

What you say indicates that your wi-fi hardware or drivers get overloaded with data and either lose too much packets for TCP to be considered broken or just start to err. Consequently increasing the amount of data will increase error frequency. Still you can try to set AutoAdjustTransferBlock property to false, then set PipelineLength to some larger value than it is by default. But not all servers handle pipelining correctly. Also you can set DownloadBlockSize and UploadBlockSize to larger values, but again this is server-specific - not all servers understand larger values.


Sincerely yours
Eugene Mayevski
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 744 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!