In recent iterations of SFTP Gateway version 3, there is an intermittent issue where a file being uploaded will hang at 100% completion and won't finish the upload transfer.
This article covers the workaround to the issue if you're not using version 3.3.5 or higher, which includes the fix.
SSH into the VM and navigate to
There you will find this file:
Edit this file and you will find this line:
JAVA_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m -server -Daws.crt.lib.dir=/opt/sftpgw/tmp -Djava.io.tmpdir=/opt/sftpgw/tmp"
You want to change it to the following:
JAVA_OPTS="-Xms256m -Xmx1024m -XX:MaxPermSize=512m -server -Daws.crt.lib.dir=/opt/sftpgw/tmp -Djava.io.tmpdir=/opt/sftpgw/tmp -DAZURE_REQUEST_WRITE_TIMEOUT=0 -DAZURE_REQUEST_READ_TIMEOUT=0 -DAZURE_REQUEST_RESPONSE_TIMEOUT=0"
To apply these changes, restart Java:
sudo su service sftpgw-admin-api restart
Also, you may want to set the timeout limit in your SFTP client to a large value, or
0, which for clients such as FileZilla or WinSCP means an infinite timeout.