rsync hangs in cron (not SSH-problem)
Chris Shoemaker
c.shoemaker at cox.net
Thu May 27 21:38:51 GMT 2004
On Fri, May 21, 2004 at 02:55:37AM +0200, Pascal Nobus wrote:
> This is the case
>
> - mounted Inetpub's windows-webserver on /mnt/web1 /mnt/web2, etc.
> - rsync this to local dir:
> rsync -av --delete /mnt/web1 /mass/kuurne/day
> rsync -av --delete /mnt/web2 /mass/kuurne/day
> etc..
>
> - when logged in, everything works (I do see some errors about
> non-existing files, but rsync won't stop.
>
>
> When used this command in cron
>
> 00 01 * * * rsync -av --delete /mnt/web1 /mass/kuurne/day
> 00 02 * * * rsync -av --delete /mnt/web2 /mass/kuurne/day
> etc..
>
>
> Rsync hangs, it doesn't finish!
>
> root 2036 5.7 10.4 27616 26704 ? S 01:00 5:19 rsync -av
> --delete /mnt/web1 /mass/kuurne/day
> root 2037 3.4 11.0 29028 28104 ? S 01:00 3:09 rsync -av
> --delete /mnt/web1 /mass/kuurne/day
> root 2048 3.1 11.0 29060 28132 ? S 01:11 2:36 rsync -av
> --delete /mnt/web1 /mass/kuurne/day
> root 2062 10.0 7.9 21304 20168 ? S 02:00 3:19 rsync -av
> --delete /mnt/web4 /mass/kuurne/day
> root 2064 4.9 8.2 22208 21056 ? S 02:00 1:37 rsync -av
> --delete /mnt/web4 /mass/kuurne/day
> root 2094 5.7 8.2 22252 21096 ? S 02:05 1:34 rsync -av
> --delete /mnt/web4 /mass/kuurne/day
It looks like you have 3 of each running concurrently.
>
>
> The dir's to be copieed are big (about 5-10 GB), but normally run it
> finishes after 10-20 min.
>
> And...
>
> Some little dir's (less then 1 GB) don't give a problem.
> However, got space enough, load = 0.00 and memory isn't full
> Mem: 255152K av, 252816K used, 2336K free, 0K shrd, 28832K
> buff
> Swap: 530104K av, 10912K used, 519192K free 38812K
> cached
>
>
>
> Ideas??
>
Uh, that memory's pretty full. Once you start paging to disk you may
never finish rsync. Does the system become unresponsive? Make sure
there are no other cron jobs that might add memory pressure timed to run
soon before (or concurrent to) the rsync.
You can also 'ls -al /proc/{pid-of-rsync}/fd' to see what files are
open.
Also, just to ensure that rsyncs don't run at the same time, consider
making just one cron job which is a script containing each rsync command
ending with semicolon (;), no backgrounding. They will always run
serially, then.
-chris
>
>
>
> --
> To unsubscribe or change options:
> http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list