Description of problem:
When sending big file (eg. > 500MB) With --timeout=xx option, the
server side of rsync timeouts out when it should not. The components
of rsync (generator or receiver or server) should exchange periodic
keepalive msg, so they will not timeout when the connection is
perfectly healthy.

Expected results:
The sync should complete without error; certainly no timeout.

Additional info:
1. The issue is more prounced with two hosts of different speed,
eg. h1 (dest) is much slower than h2 (src) (eg. h1 could be an
slower machine (especially I/O bound) with LUKS; this could be
simulated by strace on h1:receiver).
i=/tmp/t55 j=/tmp/t56
h2: dd if=/dev/zero of=$i bs=1M count=1000
h1: rsync --timeout 10 h2:$i $j

3. strace for #1 is similar to #2:
- after <s> finishes, <r> takes more than 10 sec to finish
copying <dest> to <tmp> and then rename <tmp> <dest>,
so <s> times out.

4. The issue is somewhat reproducible on one single host. But
with strace on both <s> and <r>, it becomes harder to
reproduce, probably because strace slows both <s> and <r> down.
I need to use a much bigger file (2.5GB), and strace <r> from
beginning, but strace <s> only torwards the end, to show this
error with strace.

5. There are several existing bugs that may be related to this
unexpected timeout issue.

[Bug 7757] with big file, rsync times out out when it should not; the sender is still responsive

--- Comment #2 from Loïc Gomez <[hidden email]> 2012-10-23 11:26:55 UTC ---
I ran into a similar issue recently while transferring large files (>40GB).
After a few tests, it seems - in my case at least - to be related to the
delta-xfer algorithm. The bug does not happen anymore with the -W option.

I don't know if this will resolve your issue, but you can also try looking into
these options : --no-checksum --no-compress --blocking-io. These were not the
source of my problems, but the functions they're related to might rise a
network timeout.

[Bug 7757] with big file, rsync times out out when it should not; the sender is still responsive

--- Comment #4 from Dominic Raferd <[hidden email]> ---
I can confirm that this bug still exists when using compression (-z) with rsync
3.1.0 (server and dest), and that removing compression is a good workaround.