diff --git a/lib/health_monitor/providers/database.rb b/lib/health_monitor/providers/database.rb index b7c957f..8049b0a 100644 --- a/lib/health_monitor/providers/database.rb +++ b/lib/health_monitor/providers/database.rb @@ -11,7 +11,7 @@ def check! failed_databases = [] ActiveRecord::Base.connection_handler.connection_pool_list(:all).each do |cp| - cp.connection.execute('SELECT 1') + cp.lease_connection.execute('SELECT 1') rescue Exception failed_databases << cp.db_config.name end