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.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb
index f60cac0aff0..5fbbfd90be1 100644
--- a/lib/gitlab/runtime.rb
+++ b/lib/gitlab/runtime.rb
@@ -63,12 +63,8 @@ module Gitlab
puma?
end
- def action_cable?
- web_server? && (!!defined?(ACTION_CABLE_SERVER) || Gitlab::ActionCable::Config.in_app?)
- end
-
def multi_threaded?
- puma? || sidekiq? || action_cable?
+ puma? || sidekiq?
end
def puma_in_clustered_mode?
@@ -84,12 +80,15 @@ 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?
+ if web_server?
threads += Gitlab::ActionCable::Config.worker_pool_size
end