help me understand keepalive..

Wayne Davison wayned at
Tue May 17 07:29:09 GMT 2005

On Sun, May 15, 2005 at 07:20:42PM -0500, Steve Sether wrote:
> Truly strange results.  I tried --timeout=59 on the client side
> (which is what my server config is set to), and got identical results 
> from before (timeout).  I then tried a smaller value than what's 
> specified on the server config file, and it ran to completion.  

It may be that the blocksize on the file you're transferring makes the
hard-coded lull_mod multiplier too large.  Given a timeout value of 59,
rsync will check to see if a keep-alive is needed every 150 blocks (and
it only sends the keep-alive if at least 59/2 seconds have elapsed).
With large blocks, that may not be often enough.  If you run an strace
of the sender, you should see every call to time() that rsync makes and
the value that gets returned -- that will let you calculate how
frequently the keep-alive checks are happening.  I'm assuming that rsync
just barely misses sending off a keep-alive packet before the receiver
times out when you tried the 59-second timeout, and the 58-second
timeout run got a bit lucky.

So, it would seem that a better algorithm for calculating the lull_mod
is needed.  BTW, the latest version of this sender-side keep-alive patch
is now in the "patches" dir of CVS:


More information about the rsync mailing list