diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /lib/gitlab/runtime.rb | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r-- | lib/gitlab/runtime.rb | 9 |
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? |