help me understand keepalive..

Wayne Davison wayned at
Sat May 14 19:08:44 GMT 2005

On Fri, May 13, 2005 at 06:22:56AM -0500, Steve Sether wrote:
> I'm assuming that wouldn't help this bug, since my test is only
> sending one file.

Ahh, interesting.  The keep-alive protection is currently only in the
generator, and it guards against long lulls that occur during the gaps
between finding changed files (e.g. Gentoo Linux will benefit from this
when they use rsync to copy down the changed files in their portage
hierarchy, which has thousands of small files in it).

What you're seeing here (as determined from your log files -- thanks!)
is that the receiver timed out waiting for data from the sender (note:
your "receiver" log was really from the generator, which is also on the
receiving side, but is not the receiver process).  This can occur when a
large file is sent, as the sender first reads all the checksum data into
memory before it starts plowing through the sending file and spitting
out reconstruction information to the receiver.

So, it would be good to extend the keep-alive code to have the sender
periodically spit out keep-alive packets to the receiver while it is
busy reading the checksum data from the generator.  I'll look into this,
but it might not make it into 2.5.6 (depending on how big a change it

Thanks for your help!


More information about the rsync mailing list