method

retire_old_connections

rails latest stable - Class: ActiveRecord::ConnectionAdapters::ConnectionPool

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

retire_old_connections(max_age = @max_age)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb, line 797
      def retire_old_connections(max_age = @max_age)
        max_age ||= Float::INFINITY

        sequential_maintenance -> c { c.connection_age&.>= c.pool_jitter(max_age) } do |conn|
          # Disconnect, then return the adapter to the pool. Preconnect will
          # handle the rest.
          conn.disconnect!
        end
      end