Set Statement Timeout For All Postgres Connections
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
variables:
statement_timeout: 60000 variables:
statement_timeout: '60s'ActiveRecord::Base.connection.execute('select pg_sleep(62)')Last updated