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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-05 21:07:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-05 21:07:34 +0300
commit04af78083ec8cfabc6bba6604855b1c7c4de04f2 (patch)
treeb2c85abc260461a694dc00a379112f1b2ad6531d /sidekiq_cluster
parent63414b32fd0e75477285df4603e9f7b31dffa955 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'sidekiq_cluster')
-rw-r--r--sidekiq_cluster/cli.rb5
-rw-r--r--sidekiq_cluster/sidekiq_cluster.rb2
2 files changed, 4 insertions, 3 deletions
diff --git a/sidekiq_cluster/cli.rb b/sidekiq_cluster/cli.rb
index 52dc14130fb..341ebd9019a 100644
--- a/sidekiq_cluster/cli.rb
+++ b/sidekiq_cluster/cli.rb
@@ -31,8 +31,9 @@ module Gitlab
CommandError = Class.new(StandardError)
def initialize(log_output = $stderr)
- # As recommended by https://github.com/mperham/sidekiq/wiki/Advanced-Options#concurrency
- @max_concurrency = 50
+ # https://github.com/mperham/sidekiq/wiki/Advanced-Options#concurrency
+ # https://ruby.social/@getajobmike/109326475545816363
+ @max_concurrency = 20
@min_concurrency = 0
@environment = ENV['RAILS_ENV'] || 'development'
@metrics_dir = ENV["prometheus_multiproc_dir"] || File.absolute_path("tmp/prometheus_multiproc_dir/sidekiq")
diff --git a/sidekiq_cluster/sidekiq_cluster.rb b/sidekiq_cluster/sidekiq_cluster.rb
index c68cbe7c163..66fb5603d2b 100644
--- a/sidekiq_cluster/sidekiq_cluster.rb
+++ b/sidekiq_cluster/sidekiq_cluster.rb
@@ -34,7 +34,7 @@ module Gitlab
# directory - The directory of the Rails application.
#
# Returns an Array containing the PIDs of the started processes.
- def self.start(queues, env: :development, directory: Dir.pwd, max_concurrency: 50, min_concurrency: 0, timeout: DEFAULT_SOFT_TIMEOUT_SECONDS, dryrun: false)
+ def self.start(queues, env: :development, directory: Dir.pwd, max_concurrency: 20, min_concurrency: 0, timeout: DEFAULT_SOFT_TIMEOUT_SECONDS, dryrun: false)
queues.map.with_index do |pair, index|
start_sidekiq(pair, env: env,
directory: directory,