Question

Write failed: Broken pipe

  • Posted June 4, 2013

I’m getting this quite often within Terminal on OSX, then it kicks me off the server, and i need to login again… i think it’s probably the timeout, but it’ happens really quick is there any way i can increase it?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can also configure your client to keep alive the connection every n seconds with ServerAliveInterval.

Edit /etc/ssh/ssh_config or ~/.ssh/config and add

ServerAliveInterval 360

It will send a keep alive every 360 seconds. Goes under the Host * directive so it applies to all the boxes you connect to. And that way you don’t need to edit sshd_config on all your servers.

You can also configure your client to keep alive the connection every n seconds with ServerAliveInterval.

Edit /etc/ssh/ssh_config or ~/.ssh/config and add

ServerAliveInterval 360

It will send a keep alive every 360 seconds. Goes under the Host * directive so it applies to all the boxes you connect to. And that way you don’t need to edit sshd_config on all your servers.

So what would be the recommended settings for these params if say I don’t want my site to go down because of a broken pipe like ever?

You can also configure the server side in the file /etc/ssh/sshd_config edit these params: ClientAliveInterval ClientAliveCountMax

the worst day is today. my website is down. cannot do anything. 1 miilion issue. and problem. I also face this problem.

I changed the ClientAliveInterval setting but I still get kicked out. Only on OSX.

None of these options seem to be available on nginx server?

You can increase the timeout in the /etc/ssh/sshd_config file (ClientAliveInterval).