SFTP timeout

Get help for specific problems
Posts: 4
Joined: 16 Feb 2016

DocMAX

Hello,

happy you introduced SFTP.
But i run on timeouts on slow connections.

Can you please increase the limit or let the user increase?

Thx
DocMAX
Posts: 6
Joined: 5 Nov 2016

r3c

+1 :)

(this prevents FreeFileSync from being used with Synology servers, as connection takes a few seconds when the server was in sleep mode)
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

What error message are you seeing? Currently FFS uses an SFTP-specific access time out of 15 seconds, and a general user-configurable "FolderAccessTimeout" of 20 seconds (https://freefilesync.org/manual.php?topic=expert-settings).
Posts: 6
Joined: 5 Nov 2016

r3c

Sorry for answering that late ; here is an english translation of the error message I'm seeing (original one is in French so I may introduce some inaccuracies in the text):
Unable to find following folders:

sftp://myserver/home

If this error is ignored, folders will be considered as empty. Missing folders will automatically be created if needed.
___________________________________________

Unable to connect to "myserver".
Error code LIBSSH2_ERROR_TIMEOUT: Unable to exchange encryption keys (libssh2_session_handshake)
I also got the slightly different alternative on last line:
Error code LIBSSH2_ERROR_TIMEOUT : Would block (libssh2_userauth_publickey_frommemory)
If I understand this error correctly, changing value of FolderAccessTimeout won't affect it?
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

No, this doesn't look like an ordinary time-out but more to the server not responding at all during authentication. Does this happen all the time or only occasionally?
Posts: 6
Joined: 5 Nov 2016

r3c

It happens occasionally, and only when server was in sleep mode. In that mode, any incoming connection (e.g. SSH) would wake up the server and hang for 15 sec or more until hard drives kick in. This is not an issue for most SSH/SCP software (I tried OpenSSH, PuTTY & WinSCP) but somehow it triggers this timeout error in FreeFileSync.
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

Here's a beta version that's setting the time out to 60 seconds:
http://www.mediafire.com/file/ucbg19x8o8ue9aa/FreeFileSync_8.8_beta_Windows_Setup.exe
Can you do a few tests and see if this actually avoids the LIBSSH2_ERROR_TIMEOUT errors?
Posts: 6
Joined: 5 Nov 2016

r3c

Sure, I'll try this version and keep you updated, thanks!
Posts: 6
Joined: 5 Nov 2016

r3c

Zenju: this new version works perfectly, I didn't have any timeout error on the 3 machines I tested (win7 / win10). Thanks a lot for the patch!
Posts: 1
Joined: 24 Aug 2018

LukeHillyard

Hi Zenju,
I found this thread which seems to be related to a problem I have where clicking "Browse" in the 'directory on server setup' gives an error of "CURLE_OPERATION_TIMEDOUT: server response timeout [curl_easy_perform]" this error occurs after 10 to 11 seconds. I know from experience with other software that my device needs 35 seconds to respond initially. I read where to change the expert settings timeout, now at 60 seconds, however that value does not seem to be used here. I did try to download the beta link above however it seems to be removed. Would I please be able to ask for assistance extending the initial timeout of FTP connection? Cheers
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

Timeouts for FTP and SFTP connections can now be entered in the cloud folder picker: viewtopic.php?t=5664
Posts: 6
Joined: 5 Nov 2016

r3c

Great news! Thanks for the update @Zenju.