diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-21 00:17:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-21 00:17:26 +0300 |
commit | 7263a0140abe6e08a26ff6939be4add3ba0af064 (patch) | |
tree | f250b839e52e13176483867fb1a96bdbca737a77 /lib/gitlab/runtime.rb | |
parent | b420826c09cb69fd3db101b11e0482c896de73f7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r-- | lib/gitlab/runtime.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb index f60cac0aff0..56b64b748d4 100644 --- a/lib/gitlab/runtime.rb +++ b/lib/gitlab/runtime.rb @@ -84,9 +84,12 @@ module Gitlab if puma? && Puma.respond_to?(:cli_config) threads += Puma.cli_config.options[:max_threads] elsif sidekiq? - # An extra thread for the poller in Sidekiq Cron: + # 2 extra threads for the pollers in Sidekiq and Sidekiq Cron: # https://github.com/ondrejbartas/sidekiq-cron#under-the-hood - threads += Sidekiq.options[:concurrency] + 1 + # + # These threads execute Sidekiq client middleware when jobs + # are enqueued and those can access DB / Redis. + threads += Sidekiq.options[:concurrency] + 2 end if action_cable? |