ryanlecompte / redis_failover

redis_failover is a ZooKeeper-based automatic master/slave failover solution for Ruby.
http://github.com/ryanlecompte/redis_failover
MIT License
540 stars 65 forks source link

Prevent Timeout::Error from bringing down the process #32

Closed eric closed 12 years ago

eric commented 12 years ago

I observed a problem with the node manager starting when one of the redis hosts is unreachable that resulted in the node manager failing to start:

redis_node_manager-god.log:  /usr/lib/ruby/1.8/timeout.rb:64:in `new': execution expired (Timeout::Error)
redis_node_manager-god.log:  from bundle/ruby/1.8/gems/redis_failover-0.9.3/lib/redis_failover/runner.rb:14:in `join'
redis_node_manager-god.log:  from bundle/ruby/1.8/gems/redis_failover-0.9.3/lib/redis_failover/runner.rb:14:in `run'
redis_node_manager-god.log:  from bundle/ruby/1.8/gems/redis_failover-0.9.3/bin/redis_node_manager:6
redis_node_manager-god.log:  from bundle/ruby/1.8/bin/redis_node_manager:19:in `load'
redis_node_manager-god.log:  from bundle/ruby/1.8/bin/redis_node_manager:19

The problem is Timeout::Error is not a StandardError, so it doesn't get caught with the current exception handler.

travisbot commented 12 years ago

This pull request passes (merged 0b36e28f into 977d50b6).