Yes, there is actually. Try:

  ssh_options[:timeout] = 15

That lets you set the number of seconds to wait for connection to be
established.

- Jamis

On 1/29/09 11:14 AM, Gary Richardson wrote:
> I see where you're coming from. This is a bit of an edge case, and the
> work around is to use a monitoring system to tell you when a system dies :)
> 
> I suppose I'm not really looking for a command timeout, more a timeout
> on the SSH connection. It never completes the authentication handshake,
> as far as I can tell. The port is responsive, but OpenSSH never sends a
> banner and input is ignored.
> 
> Does an SSH timeout feature exist?
> 
> Thanks!
> 
> On Thu, Jan 29, 2009 at 10:06 AM, Jamis Buck <[email protected]
> <mailto:[email protected]>> wrote:
> 
> 
>     Gary,
> 
>     There's not currently any way to set a timeout on a command. I'd be a
>     little nervous about adding such a setting, because I fear it would set
>     expectations. For instance, suppose you have a timeout on a long-running
>     command. The timeout expires, and Capistrano closes the connection.
>     Would users expect capistrano to also try and abort the command? Would
>     they be surprised to see the command still running on the host after
>     Capistrano times out?
> 
>     That said, if someone wants to try and roll a patch for Capistrano that
>     implements command timeouts, I'd consider it. Especially if they're able
>     to address the "what happens on the server when a timeout expires"
>     question, unambiguously.
> 
>     - Jamis
> 
>     On 1/29/09 10:25 AM, Gary Richardson wrote:
>     > Hi,
>     >
>     > I'm currently load testing an application and I seem to be crashing
>     > some of my cluster members. They still respond to pings, but when I
>     > try to run commands against them, they hang. I'm assuming this is
>     > because Capistrano is able to connect to the SSH port, but it doesn't
>     > respond.
>     >
>     > For example, cap invoke COMMAND=uptime will sit forever waiting for
>     > the port to respond.
>     >
>     > Is there away to set a timeout for a command? That would make it easy
>     > for me to figure out which hosts were dead.
>     >
>     > Thanks!
>     >
>     > >
> 
> 
> 
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to