Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDrew Blessing <drew@gitlab.com>2016-11-04 22:48:05 +0300
committerDrew Blessing <drew@gitlab.com>2016-11-04 22:58:02 +0300
commitd498ec98e0286efecd70040180c69c2002f9ed78 (patch)
tree4f8f9f6e780388e569554e74ea85e1cceb292286 /config
parent8d0d8b91e46573e8fe46dc712e84c65708a00b97 (diff)
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.
Diffstat (limited to 'config')
-rw-r--r--config/initializers/sidekiq.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 0455a98dbfe..023af2af23c 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -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