Browse Source

Fixes: #4450 - Scheduler dies with "could not obtain a connection from the pool within"

This commit removes a workaround that was introduced for #2656. This has become obsolete
with Rails 6.0.

Since #4450 is not reproducible for us, we cannot certainly confirm that the removal really fixes
that issue, but chances are good since it does affect connection pool clean-up handling.
Mantas Masalskis 1 year ago
parent
commit
45157bee4a
2 changed files with 0 additions and 25 deletions
  1. 0 1
      config/application.rb
  2. 0 24
      config/issue_2656_workaround_for_rails_issue_33600.rb

+ 0 - 1
config/application.rb

@@ -3,7 +3,6 @@
 require_relative 'boot'
 
 require 'rails/all'
-require_relative 'issue_2656_workaround_for_rails_issue_33600'
 require_relative '../lib/zammad/safe_mode'
 
 # DO NOT REMOVE THIS LINE - see issue #2037

+ 0 - 24
config/issue_2656_workaround_for_rails_issue_33600.rb

@@ -1,24 +0,0 @@
-# Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
-
-# This temporary workaround for issue #2656.
-# The root cause is an issue in Rails: https://github.com/rails/rails/issues/33600
-# It disables database connnection reaping by setting `reaping_frequency` to 0 for each environment in the config/database.yml file.
-# It restores the DB connection reaping behavior Rails > 5.2 had.
-# It was proposed in a comment on the Rails issue: https://github.com/rails/rails/issues/33600#issuecomment-415395901
-# It was confirmed by @matthewd (a Rails core maintainer) in another comment: https://github.com/rails/rails/issues/33600#issuecomment-415400522
-module Rails
-  class Application
-    class Configuration < ::Rails::Engine::Configuration
-
-      alias database_configuration_original database_configuration
-
-      def database_configuration
-        database_configuration_original&.transform_values do |config|
-          config.merge(
-            'reaping_frequency' => 0
-          )
-        end
-      end
-    end
-  end
-end