SFTP very slow in batchmode, very fast interactive mode
Posted: 2020/03/05 08:17:16
Hi,
We have an issue one several centos servers where we tried to SFTP to another external server outside our company.
Interactive mode - human enter command.
- in this way, the transfer for 100MB file is very fast. We have no issue. Take 20-30 secs to complete.
sftp -vvv username@[sftp server name or IP]
Batch mode - script/passing of multiple commands.
- in this way, the transfer for 100MB file is very slow. Take hours to complete.
sftp -vvv -oBatchMode=no -b [script name] username@[sftp server name or IP]
or
sftp -vvv username@[sftp server name or IP] <<< $'cd /upload\n put mysqld.org'
Command enter manually and the one in the script file is the same.
Both are using the same file, ISP and line to the external site.
We have spend 3 days trying to test and figure out why. Still we have no idea why this is happen.
The firewall, there is no limit for port 22 to the external site.
Any idea why this is happening?
We have an issue one several centos servers where we tried to SFTP to another external server outside our company.
Interactive mode - human enter command.
- in this way, the transfer for 100MB file is very fast. We have no issue. Take 20-30 secs to complete.
sftp -vvv username@[sftp server name or IP]
Batch mode - script/passing of multiple commands.
- in this way, the transfer for 100MB file is very slow. Take hours to complete.
sftp -vvv -oBatchMode=no -b [script name] username@[sftp server name or IP]
or
sftp -vvv username@[sftp server name or IP] <<< $'cd /upload\n put mysqld.org'
Command enter manually and the one in the script file is the same.
Both are using the same file, ISP and line to the external site.
We have spend 3 days trying to test and figure out why. Still we have no idea why this is happen.
The firewall, there is no limit for port 22 to the external site.
Any idea why this is happening?