diff --git a/lib/sphinx/integration/mysql/connection_pool.rb b/lib/sphinx/integration/mysql/connection_pool.rb index 13f66da..d073555 100644 --- a/lib/sphinx/integration/mysql/connection_pool.rb +++ b/lib/sphinx/integration/mysql/connection_pool.rb @@ -34,7 +34,9 @@ def self.slave_connection(agent_name) options = { :host => address_prepared(agent[:address]), :port => port_prepared(agent[:mysql41]), - :reconnect => true + :reconnect => true, + :read_timeout => 1, # очень хочется 300мс, но к сожалению можно только в секундах :( + :connect_timeout => 1 } Sphinx::Integration::Mysql::Connection.new options[:host], options[:port], options