mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Retry failed index calls
This commit is contained in:
parent
657af4c1c8
commit
9223dbb584
1 changed files with 6 additions and 1 deletions
|
@ -169,10 +169,15 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|||
#timer.stop
|
||||
decrement_inflight_request_count
|
||||
end.on(:failure) do |exception|
|
||||
@logger.warn("Failed to index an event", :exception => exception,
|
||||
@logger.warn("Failed to index an event, will retry", :exception => exception,
|
||||
:event => event.to_hash)
|
||||
#timer.stop
|
||||
decrement_inflight_request_count
|
||||
|
||||
# Failed to index, try again after a short sleep (incase our hammering is
|
||||
# the problem).
|
||||
sleep(0.200)
|
||||
receive(event)
|
||||
end
|
||||
|
||||
# Execute this request asynchronously.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue