Skip to main content

Posts

Showing posts from May, 2019

`rsync` freezes and hangs on large files

rsync: connection unexpectedly closed (... bytes received so far) [sender]I have regular server backups which transfers large files over 500GB+ and have --append-verify or --checkusm over ssh parameters specified. What I have found upon analysis is that once the client side completes it's file checks then the server side checks start. Which means while the server is doing it's checks the client side will appear hanged and frozen - run htop on the server to rsync working away.On related note, this very LONG wait would trigger SSH timeout and a rsync: connection unexpectedly closed (254 bytes received so far) [sender] error message, solution is to add below settings to your /etc/ssh/sshd_config. # This will make the server send the clients a “null packet” every 120 seconds and not disconnect them until the client # have been inactive for 720 intervals (120 seconds * 720 = 86400 seconds = 24 hours). ClientAliveInterval 120 ClientAliveCountMax 720 Both issues are likely a non iss…