instance method retire_old_connections

Ruby on Rails 8.1.2

Since v8.1.2

Signature

retire_old_connections(max_age = @max_age)

No documentation comment.

Parameters

max_age opt = @max_age
Source
# 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

Defined in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb line 797 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ConnectionAdapters::ConnectionPool

Type at least 2 characters to search.

↑↓ navigate · open · esc close