linux - rsync 同步文件时卡住不动
高洛峰
高洛峰 2017-04-17 13:07:07
0
3
1872

具体表现是:我使用rsync往服务器同步文件,我设置了超时timeout=5(不设置这个值也会出现这样的问题),然后运行大约1小时后,不断出现timeout的错误提示,出现大约10多个后,程序卡在rsync上不往下运行。此时的CPU很高,如下:

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                             
 2243 luffyctz  25   0  3900 1184  944 R   99  0.0   8:08.98 rsync   

请问这是什么问题呢?

server端的log补充:
2015/03/24 20:05:59 [9603] Service registration expired, refreshing it
2015/03/24 20:05:59 [9603] rsyncd registering 1 service with slpd for 300 seconds:
2015/03/24 20:05:59 [9603] Could not resolve hostname: Name or service not known
2015/03/24 20:10:36 [23380] rsync error: timeout in data send/receive (code 30) at io.c(171) [receiver=2.6.8]

客户端的错误提示:
rsync error: timeout in data send/receive (code 30) at io.c(171) [receiver=2.6.8]
rsync: connection unexpectedly closed (4 bytes received so far) [sender]

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
阿神

-v can add log level, you can try adding it.
In addition, your rsync server can also configure the log level. What errors does the rsync server display?

迷茫

Clear the number and file size of synchronized files. I once encountered a situation where the CPU was very high and there was no speed limit, and it was occupied crazy. Use --bwlimit=500 to limit it to 500kb/s.

In addition, you should really open the log and paste the complete log. Just saying a timeout cannot diagnose

阿神

Visually it is a network problem.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template