Setup a timeout on long query

This commit is contained in:
simon lehericey 2019-10-17 16:28:28 +02:00
parent ee6f0db5fb
commit 1e8e45232a

View file

@ -3,6 +3,11 @@ default: &default
encoding: unicode
pool: <%= ENV.fetch("DB_POOL") { 5 } %>
timeout: 5000
# sql queries will be killed after 60s
# we should reduce this number
# A bigger timeout can be set for jobs
variables:
statement_timeout: <%= ENV['PG_STATEMENT_TIMEOUT'] || 60000 %>
development:
<<: *default