Commit c25ac432 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'remove-sidekiq-backup-ar-threads' into 'master'

Don't use backup AR connections for Sidekiq

Closes #27713

See merge request !9001
parents c495e5f1 f116f87c
---
title: Don't use backup Active Record connections for Sidekiq
merge_request:
author:
......@@ -36,11 +36,9 @@ Sidekiq.configure_server do |config|
Gitlab::SidekiqThrottler.execute!
# Database pool should be at least `sidekiq_concurrency` + 2
# For more info, see: https://github.com/mperham/sidekiq/blob/master/4.0-Upgrade.md
config = ActiveRecord::Base.configurations[Rails.env] ||
Rails.application.config.database_configuration[Rails.env]
config['pool'] = Sidekiq.options[:concurrency] + 2
config['pool'] = Sidekiq.options[:concurrency]
ActiveRecord::Base.establish_connection(config)
Rails.logger.debug("Connection Pool size for Sidekiq Server is now: #{ActiveRecord::Base.connection.pool.instance_variable_get('@size')}")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment