Capistrano hanging on svn export

Posted by mick on October 29th, 2008 filed in Capistrano, Ruby on Rails, ssh

I’ve been running into a problem lately where my attempts to deploy new versions of my rail app were hanging. Specifically, when I ran:


cap deploy
 

Capistrano would hang executing the svn export command. It took me a while to work out what was happening, but it turned out that the ssh connection being used by Capistrano to connect to the server was timing out. To fix the problem you can edit the ~/.ssh/config file on your client machine, and define values for the following settings:


ServerAliveCountMax 30
ServerAliveInterval 120
 

On the server, edit the file /etc/ssh/sshd_config and define values for the following:


ClientAliveInterval 60
ClientAliveCountMax 60
 

and then restart the ssh daemon on the server:


sudo /etc/init.d/ssh start
 

The exact values to use for the various settings are up to you. For more info on how they work, you can consult the online doco on your client machine:


man ssh_config
 

Leave a Comment

//