mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Merge pull request #767 from logstash/LOGSTASH-1475
- Reconnect if redis appears down/dead (LOGSTASH-1475)
This commit is contained in:
commit
9b1c732659
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue