Hi - entering this thread late... On Wed, May 23, 2012 at 07:46:29PM +0100, Gary Dale wrote: > I'm connecting at various times to different Debian/Squeeze servers from > my Debian/Wheezy workstation using ssh. No matter which server I connect > to, I find that if I move a lot of data on the remote server, I get > kicked out of my ssh session with a "Write failed: Broken pipe" error.
I've seen that before and it took us ages to narrow down - in our case (admittedly your case may be different), it was the combination of network interface MTU and packet fragmentation. Reducing the MTU on our local network interface (on the server which runs the SSH client) to 1450 (rather than the default 1500) solved it consistently: sudo ifconfig eth0 mtu 1450 (to make the effect permanent, tweak /etc/network/interfaces and/or network manager config) Unfortunately we never found the root cause of the problem: Packet fragmentation is normally handled transparently by the TCP layer and there were no VPNs or VLANs involved. > This doesn't happen immediately. It usually occurs after some period of > time, during which time the cp or rsync command is moving data from one > location to another (gigabytes typically). So far as I can tell, the > operation finished successfully. Interesting. > > This is repeatable 100% of the time. > > typical commands: > cp /tmp/backups/* /media/dvd > rsync /tmp/backups/file /media/dvd/file Hm. These commands would not use the network - unless /tmp or /media happen to be NFS mounted, ISCSI-backed or similar - and neither involves ssh... > I have even encountered it with > if cmp /media/backupmedia/backup-set /home/shares/backup/backup-set; > then echo "OK"; fi Hm.. this example does not involve ssh at all!? And (apparantly) not network either? > although this sometimes works. I think it depends on the exact size of > the file. The cmp operation seems to not trigger it as fast as rsync or cp. > > If I'm not moving large amounts of data on the server, the ssh session > is stable and will sit for as long as I want. I only get disconnected > when I'm moving data around on the remote machine. That is consistent with the symptoms we saw before decreasing the MTU. Hope this helps -- Karl E. Jorgensen IT Operations -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120524113910.GQ17862@hawking