Merge branch 'remove-sidekiq-backup-ar-threads' into 'master'
Don't use backup AR connections for Sidekiq Closes #27713 See merge request !9001
This commit is contained in:
commit
c25ac43276
2 changed files with 5 additions and 3 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
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')}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue