Differences

This shows you the differences between the selected revisions of the page.

2023-11-27 2023-12-22
auto is sftp and scp only (martin) 6.2.2 Issue 2244 – Do not use directory listing to keep FTP session alive by default + overall rewording and explanation why keepalives are not available for webdav and s3 (martin)
Line 24: Line 24:
Some servers (and also firewalls and routers on the way between the client and the server) disconnect clients if they do not receive any data from it within a defined period. In the //Keepalives// box, you may order WinSCP to send some dummy data in regular periods to avoid being disconnected. This period is defined with //Seconds between keepalives//. Some servers (and also firewalls and routers on the way between the client and the server) disconnect clients if they do not receive any data from it within a defined period. In the //Keepalives// box, you may order WinSCP to send some dummy data in regular periods to avoid being disconnected. This period is defined with //Seconds between keepalives//.
-WinSCP implements two methods for keepalives. For SFTP and SCP, the basic option is to send SSH-level keepalives implemented by null %%SSH%% packets (%%SSH%% ignore messages). Some servers may be configured not to count these packets as data and thus they will still disconnect clients sending them. +For SFTP and SCP, WinSCP implements two methods for keepalives. The basic option is //Sending of null SSH packets// (%%SSH%% ignore messages). Some servers may be configured not to count these packets as data and thus they will still disconnect clients sending them. As an alternative WinSCP can improve the keepalives by //Executing dummy protocol commands// instead. For %%SFTP%% it is implemented as canonization of path ''/''. For %%SCP%% it is implemented as ''echo'' command.((With %%SCP%% this keepalive method does not work while WinSCP waits for user prompt in the middle of file transfer.))
-As an alternative WinSCP can send dummy commands of the transfer protocol instead. For %%SFTP%% it is implemented as canonization of path ''/''. For %%SCP%% it is implemented as ''echo'' command.((With %%SCP%% this keepalive method does not work while WinSCP waits for user prompt in the middle of file transfer.)) For FTP it is the only option and is implemented as randomly selected %%FTP%% protocol command with no effect.+For FTP, the basic option is to keep the session alive by //Executing dummy protocol commands//. As an alternative WinSCP can improve the keeplives by //Additionally reading the current directory// //(This option can be configured separately in the latest beta version only. In the stable version, this is included in the basic option already).// &beta
-The option is not available with [[webdav|WebDAV]] and [[s3|S3]] protocols.+The keepalives are not available with [[webdav|WebDAV]] and [[s3|S3]] protocols, as those are stateless protocols.
Note that keepalives are not always helpful. They help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from breaks in connectivity then keepalives can actually make things worse. If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem -- neither endpoint will notice that anything was wrong. However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn't believe there is an open connection any more. Keepalives can make this sort of problem worse, because they increase the probability that WinSCP will attempt to send data during a break in connectivity. (Other types of periodic network activity can cause this behavior; in particular, [[ui_login_kex|re-keys]] can have this effect.) Note that keepalives are not always helpful. They help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from breaks in connectivity then keepalives can actually make things worse. If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem -- neither endpoint will notice that anything was wrong. However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn't believe there is an open connection any more. Keepalives can make this sort of problem worse, because they increase the probability that WinSCP will attempt to send data during a break in connectivity. (Other types of periodic network activity can cause this behavior; in particular, [[ui_login_kex|re-keys]] can have this effect.)

Last modified: by martin