class ActiveRecord::ConnectionAdapters::AbstractAdapter

def verify!(*ignored)

is no longer active, then this method will reconnect to the database.
This is done under the hood by calling active?. If the connection
Checks whether the connection to the database is still active (i.e. not stale).
def verify!(*ignored)
  reconnect! unless active?
end