diff --git a/lib/logstash/inputs/redis.rb b/lib/logstash/inputs/redis.rb index 773049e69..7ec8bf69f 100644 --- a/lib/logstash/inputs/redis.rb +++ b/lib/logstash/inputs/redis.rb @@ -223,6 +223,10 @@ EOF begin @redis ||= connect self.send listener, @redis, output_queue + rescue Redis::CannotConnectError => e + @logger.warn("Redis connection problem", :exception => e) + sleep 1 + @redis = connect rescue => e # redis error @logger.warn("Failed to get event from redis", :name => @name, :exception => e, :backtrace => e.backtrace)