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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r--lib/gitlab/runtime.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb
index 269fb74ceca..e560db7ace8 100644
--- a/lib/gitlab/runtime.rb
+++ b/lib/gitlab/runtime.rb
@@ -89,12 +89,11 @@ module Gitlab
if puma? && ::Puma.respond_to?(:cli_config)
threads += ::Puma.cli_config.options[:max_threads]
elsif sidekiq?
- # 2 extra threads for the pollers in Sidekiq and Sidekiq Cron:
- # https://github.com/ondrejbartas/sidekiq-cron#under-the-hood
+ # Sidekiq has a internal connection pool to handle heartbeat, scheduled polls,
+ # cron polls and housekeeping. max_threads can match Sidekqi process's concurrency.
#
- # These threads execute Sidekiq client middleware when jobs
- # are enqueued and those can access DB / Redis.
- threads += Sidekiq[:concurrency] + 2
+ # The Sidekiq main thread does not perform GitLab-related logic, so we can ignore it.
+ threads = Sidekiq.default_configuration[:concurrency]
end
if puma?