AWS SFTP Timeout waiting for status message

Get help for specific problems
Posts: 3
Joined: 20 Jan 2023

geekyd

Hi,

I'm trying to sync about 9mil files to AWS. The initial transfer works fine, but for a couple of folders that now contain more than about 70,0000 I keep getting the message below:

Cannot read directory "sftp://sftp-loc@........"
LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED: Timeout waiting for status message [libss2_sftp_readdir]

If I delete those folders from AWS I can re-upload them with FFS in full without any issues (apart from time). So it just seems that FFS times out when scanning for any changes in those folders. I've tried increasing the timeout on the SFTP connection string (ie: |Timeout=300) but it doesn't seem to make any difference.

I saw on some other posts you could also change different timeouts via Advanced Settings in the GlobalSettings.XML - but I can't find any info about what settings you can change.

Any help would be appreciated :)

Thanks in advance,

Danny.
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

The problem is libssh2 has a hard-coded limit for STP package size (256KB): https://github.com/libssh2/libssh2/pull/268

libssh2 is at fault: This limit should not be applied while reading a directory.

AWS is at fault: A multi-MB package size is ridiculous(?). They should probably fix their home-grown SFTP server code to return multiple packages instead of just one.
User avatar
Site Admin
Posts: 7506
Joined: 9 Dec 2007

Zenju

I just can't help myself, I've written a patch: https://github.com/libssh2/libssh2/pull/791
Posts: 3
Joined: 20 Jan 2023

geekyd

Thanks Zenju, you're a legend :)

How do I apply that patch, or do I wait for the next version to be compiled/released?
Posts: 3
Joined: 20 Jan 2023

geekyd

Seems to work fine on the scan/compare - just running an update sync now.

Thank you so much for sorting! :)