mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
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?
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
defaults: &defaults
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
pool: <%= ENV.fetch('OFN_DB_POOL', 5) %>
|
||||
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') %>
|
||||
|
||||
Reference in New Issue
Block a user