Set default Sidekiq retries to 3
By default, Sidekiq will retry 25 times with an exponential backoff. This may result in jobs retrying for up to 21 days. Most Sidekiq failures occur when attempting to connect to external services - Project service hooks, web hooks, mailers, mirror updates, etc. We should set a default retry of 3, and if that's not sufficient individual workers can override this in the worker class.
This commit is contained in:
parent
8d0d8b91e4
commit
d498ec98e0
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Set default Sidekiq retries to 3
|
||||
merge_request: 7294
|
||||
author:
|
|
@ -2,6 +2,9 @@
|
|||
redis_config_hash = Gitlab::Redis.params
|
||||
redis_config_hash[:namespace] = Gitlab::Redis::SIDEKIQ_NAMESPACE
|
||||
|
||||
# Default is to retry 25 times with exponential backoff. That's too much.
|
||||
Sidekiq.default_worker_options = { retry: 3 }
|
||||
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = redis_config_hash
|
||||
|
||||
|
|
Loading…
Reference in New Issue