Files
openfoodnetwork/config/database.yml
Maikel Linke aeaaf8935e Increase DB connection pool size for specs
A spec failed with this message:

  ActiveRecord::ConnectionTimeoutError:
    could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds); all pooled connections were in use

The error seems to be raised when trying to authenticate the user
through Devise in a before_action block. Increasing the pool size by one
helped.

I don't know why our app needs more than 5 connections at the same time.
Maybe some gem "forgets" to release connections?
2021-04-12 12:15:59 +10:00

25 lines
563 B
YAML

defaults: &defaults
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch('OFN_DB_POOL', 6) %>
host: <%= ENV.fetch('OFN_DB_HOST', 'localhost') %>
username: <%= ENV.fetch('OFN_DB_USERNAME', 'ofn') %>
password: <%= ENV.fetch('OFN_DB_PASSWORD', 'f00d') %>
port: <%= ENV.fetch('OFN_DB_PORT', 5432) %>
development:
<<: *defaults
database: open_food_network_dev
test:
<<: *defaults
database: open_food_network_test
production:
<<: *defaults
database: open_food_network_prod
staging:
<<: *defaults
database: open_food_network_prod