increase size of connection pool

This commit is contained in:
Sebastian Jambor 2023-04-18 22:09:59 +02:00
parent 5e115a4a77
commit 29f9c0d09e

View file

@ -1,6 +1,9 @@
default: &default
adapter: postgresql
pool: <%= ENV["DB_POOL"] || ENV['MAX_THREADS'] || 5 %>
# The db pool must contain at least one more connection than the number of threads.
# Each thread uses its own connection, and we need an additional connection used
# by the ActivityLogAudienceHelper
pool: <%= ENV["DB_POOL"] || ENV.fetch('MAX_THREADS', 5).to_i + 1 %>
timeout: 5000
connect_timeout: 15
encoding: unicode