method

keep_alive

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.

keep_alive(threshold = @keepalive)
public

Prod any connections that have been idle for longer than the configured keepalive time. This will incidentally verify the connection is still alive, but the main purpose is to show the server (and any intermediate network hops) that we’re still here and using the connection.