Scripting: Unexpected delay between file put and call

Advertisement

mikef
Guest

Scripting: Unexpected delay between file put and call

I have a script that is run from winscp3.com that first tries to "put" a file and then "call" to run a script on the remote server. This works OK but the process runs a lot slower than I would expect. It can takes on average 40 seconds to transfer the file and run the script.

I can see in the scp.log there seems to be a delay of 30 seconds between the file transfer finishing and the remote command executing. I don't think file transfer speed is the issue as the files being transfered are small (less than 2k bytes).

Do you have any idea what may be causing this delay or how I could get around it ? Is there any parameter that I could adjust to reduce or remove it ?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: Scripting: Unexpected delay between file put and call

If you are using SFTP protocol, the first "call" requires opening separate shell session, which may take some time. Would that explain it?

Reply with quote

mikef
Guest

Re: Scripting: Unexpected delay between file put and call

martin wrote:

If you are using SFTP protocol, the first "call" requires opening separate shell session, which may take some time. Would that explain it?

Thanks that explains part of it. I've run the commands the in the script by hand it takes about 10 seconds for the initial "open" to finish, the "put" takes under a second, then as you say the "call" makes a seperate connection and shell but this takes about 30 seconds which seems like a long time. So it seems like the delays happening are when exstablishing a connection. Is there any way to reduce these times?

Mike

Reply with quote

martin
Site Admin
martin avatar

Re: Scripting: Unexpected delay between file put and call

Setting up shell session may take longer due to setup WinSCP does for compatibility reasons. Some steps of the setup maybe omitted in most cases to speedup connection. Please read documentation.

Reply with quote

Advertisement

You can post new topics in this forum