On Tue, 2008-12-30 at 09:49 +1100, David Keegel wrote:
> On Mon, Dec 29, 2008 at 02:50:10PM -0500, Eric S. Johansson wrote:
> > for some reason, the rsnapshot process stalls and blocks everything.
> > Obviously, this is unacceptable. I would rather have rsync retry/timeout
> > selected try to diagnose which machines are hanging up. I think this is a
> > problem backing up from Windows boxes for the most part. is there anyway to
> > get this kind of timeout behavior out of rsync and error reporting from rsnapshot?
> I had a problem like that a couple of years ago, when trying to back up
> Windows boxes with rsync over ssh, using cygwin. Most of the time it
> would rsync a few files and then hang. I could reproduce the problem
> with a manual rsync (no need to involve rsnapshot at all).
Yes, there's a well-known Cygwin hang bug that rsync seems to hit
especially often. IIRC, the problem is that the Windows API doesn't
provide the necessary functionality to fully emulate select(2) on pipes,
so Cygwin does the best it can and fails sometimes. Setting a --bwlimit
may avoid the hang if the speed reduction is acceptable.
> Adding --timeout=3600 to the rsync options helped a bit (so at least
> it would exit after no input/output for 1 hour),
I'll add that one can make rsync restart automatically on timeout using
the recently added "rsync_numtries" configuration parameter.
> but what REALLY helped
> was changing it from using rsync over ssh to rsync over rsyncd.
That often helps, but I do recall one report of a hang when connecting
directly to an rsync daemon.