help me understand keepalive..

Wayne Davison wayned at samba.org
Fri May 13 01:06:55 GMT 2005


On Thu, May 12, 2005 at 04:43:55PM -0500, Steve Sether wrote:
> Now my understanding was that the keepalive feature was supposed to
> prevent this from ever happening.

Yes, that's certainly what it's supposed to prevent.

> Am I doing something wrong?

Maybe.  You must be using at least 2.6.4 on both ends of the connection
and not overriding the protocol version below 29.  (You can see what
protocol was negotiated by specifying at least four -v options.)  If the
remote system has multiple versions of rsync installed, perhaps it is
running an older one unbeknownst to you.

Even with keep-alive, if you run something that takes up too much time,
rsync could conceivably still timeout.  For instance, using --checksum
with really large files might not get to the keep-alive check often
enough to make a difference.  Or using --fuzzy with a lot of missing
files into a large directory could be pretty slow too.  (You don't
mention what options you're using, so I'm going to stop guessing at
what might be slowing things down.)

In any case, it would be good to know at what point in the transfer it
was timing out.  You might try setting larger levels of verbosity, and
if it still times out, let me know at what was going on at the time of
the failure (perhaps attach strace to the generator process too -- it's
the first (which usually means lowest) PID of the two processes on the
receiving side).

One potential "fix" you could try is to change the initialization of
the "lull_mod" value in generator.c to 1.  That would make it call
maybe_send_keepalive() after every file.

..wayne..


More information about the rsync mailing list