From 6bc05bba87270e34f85c65d14045085dcb96cf52 Mon Sep 17 00:00:00 2001 From: Shimon Shtein Date: Sun, 5 May 2024 13:51:48 +0300 Subject: [PATCH] Refs #33974 - Update the db_pool value 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 --- .../foreman.migrations/20240505103832_change_db_pool_size.rb | 3 +++ config/katello.migrations/240506081834-change-db-pool-size.rb | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 config/foreman.migrations/20240505103832_change_db_pool_size.rb create mode 100644 config/katello.migrations/240506081834-change-db-pool-size.rb diff --git a/config/foreman.migrations/20240505103832_change_db_pool_size.rb b/config/foreman.migrations/20240505103832_change_db_pool_size.rb new file mode 100644 index 00000000..e77ef4ee --- /dev/null +++ b/config/foreman.migrations/20240505103832_change_db_pool_size.rb @@ -0,0 +1,3 @@ +if answers['foreman'].is_a?(Hash) && answers.dig('foreman', 'db_pool').to_i == 5 + answers['foreman'].delete('db_pool') +end diff --git a/config/katello.migrations/240506081834-change-db-pool-size.rb b/config/katello.migrations/240506081834-change-db-pool-size.rb new file mode 100644 index 00000000..e77ef4ee --- /dev/null +++ b/config/katello.migrations/240506081834-change-db-pool-size.rb @@ -0,0 +1,3 @@ +if answers['foreman'].is_a?(Hash) && answers.dig('foreman', 'db_pool').to_i == 5 + answers['foreman'].delete('db_pool') +end