Is there anyway to increase the ssh timeout in capistrano, or even better to have some form of keep-alive like the ServerAliveInterval/ ServerAliveCountMax settings in the openssh client config?
I'm deploying to EC2, and I've noticed that capistrano will die half way through a deploy pretty reliably with a ECONNRESET. This mostly happens during ec2 peak hours, so I think something in their routers must be removing idle connections. The problem is, my connection isn't really idle - during my deployment I serially execute the restart of my servers so that we don't have any downtime. As a result, by the time it gets to the last server, its been sitting idle for a while, and I think the connection is dead, though cap doesn't seem to know it till it tries to write to it. This happens when I do other long lived tasks that don't have any output. Here is the stack trace I see when my deploy dies: usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/ buffered_io.rb:64:in `recv': Connection reset by peer - recvfrom(2) (Errno::ECONNRESET) from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/ buffered_io.rb:64:in `fill' from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/ connection/session.rb:200:in `postprocess' from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/ connection/session.rb:196:in `each' from /usr/local/lib/ruby/gems/1.8/gems/net-ssh-2.0.2/lib/net/ssh/ connection/session.rb:196:in `postprocess' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/lib/ capistrano/processable.rb:31:in `process_iteration' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/lib/ capistrano/processable.rb:43:in `ensure_each_session' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/lib/ capistrano/processable.rb:41:in `each' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/lib/ capistrano/processable.rb:41:in `ensure_each_session' ... 67 levels... from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/lib/ capistrano/cli/execute.rb:14:in `execute' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.4.0/bin/cap:4 from /usr/local/bin/cap:19:in `load' from /usr/local/bin/cap:19 Any help appreciated, thanks, Matt --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---