-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new value should be at least the number of puma threads + 4. More details: https://community.theforeman.org/t/rails-connection-pool-size-optimizations/36675
- Loading branch information
1 parent
e6e1ea7
commit 1a3e0cf
Showing
2 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
config/foreman.migrations/20240505103832_change_db_pool_size.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if answers['foreman'].is_a?(Hash) && answers.dig('foreman', 'db_pool') | ||
puma_threads_max = answers.dig('foreman', 'foreman_service_puma_threads_max').to_i | ||
answers['foreman']['db_pool'] = [answers.dig('foreman', 'db_pool').to_i, puma_threads_max + 4].max | ||
end |
4 changes: 4 additions & 0 deletions
4
config/katello.migrations/240506081834-change-db-pool-size.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if answers['foreman'].is_a?(Hash) && answers.dig('foreman', 'db_pool') | ||
puma_threads_max = answers.dig('foreman', 'foreman_service_puma_threads_max').to_i | ||
answers['foreman']['db_pool'] = [answers.dig('foreman', 'db_pool').to_i, puma_threads_max + 4].max | ||
end |