Contribute  :  Calendar  :  Advanced Search  :  Site Statistics  :  Directory  :  Files to download  :  Links for developers  :  Privacy policy  :  Web Resources  :  Polls  
    MacOSX Guru Site Information, tips and tricks, FAQ for Mac OS X developers    
 Welcome to MacOSX Guru Site
 Friday, December 19 2014 @ 04:34 AM UTC

rsync/scp "Connection reset by peer" problems

   
Unix under OS X FAQAfter the ADSL line has been updated by our provider, we got a lot of "Connection reset by peer" problems when retrieving backups from a remote server using rsync and scp … but the quality of the line doesn't seem to be the problem… any idea ?

When your local computer can't catch-up decrypting and writing the received data down to the hard disk, it sends some messages (ICMP source quench - type 4 messages) to remote host to ask it to slow down…

Some Linux boxes doesn't respect that, and continue to send to full speed… the only way for the local computer to solve the race condition is to give up…

So probably the new ADSL line bandwidth is too high for your computer to catch up with the processing and writing of the encrypted stream… in other words our new line is too good… for your computer…

The easiest solution is to modify your scripts and add "--bwlimit=$MAXKBS" to your rsync lines and "-l $MAXKBS" to your scp ones. (see man rsync and man scp for more info).

With MAXKBS being defined at top of your scripts (or sourced from a common location…) and set it to a lower value than the max bandwidth of your ADSL line.

You will have to do some testing to find the right one for your configuration since it's also depends on your computer CPU speed and quality of the hard disk I/O.
 

What's Related

Story Options

rsync/scp "Connection reset by peer" problems | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
 Copyright © 2014 MacOSX Guru Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.06 seconds