From fdbad7c5d8a95624ccd54535d9d8ceb12da1b8a6 Mon Sep 17 00:00:00 2001 From: sony-mathew Date: Tue, 11 Feb 2020 21:50:38 +0530 Subject: [PATCH] Bug Fix : Increased the connection pool size and concurrency for Sidekiq --- config/initializers/sidekiq.rb | 8 ++++---- config/sidekiq.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index e14e4c839..f2fb8ead0 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,12 +1,12 @@ sidekiq_redis_config = { - url: ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379'), - password: ENV.fetch('REDIS_PASSWORD', nil) + url: ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379'), + password: ENV.fetch('REDIS_PASSWORD', nil) } Sidekiq.configure_client do |config| - config.redis = sidekiq_redis_config.merge(size: 5) + config.redis = sidekiq_redis_config.merge(size: 15) end Sidekiq.configure_server do |config| - config.redis = sidekiq_redis_config.merge(size: 10) + config.redis = sidekiq_redis_config.merge(size: 15) end diff --git a/config/sidekiq.yml b/config/sidekiq.yml index fa944ddae..b699d8d9d 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -4,7 +4,7 @@ # pick it up automatically. --- :verbose: false -:concurrency: 3 +:concurrency: 5 :timeout: 25 # Sidekiq will run this file through ERB when reading it so you can @@ -18,6 +18,6 @@ # you can override concurrency based on environment production: - :concurrency: 10 + :concurrency: 20 staging: - :concurrency: 5 + :concurrency: 10