Reduce DB pool size to 20 for 3-replica deployment

3 replicas × 50 connections exceeded max_connections during rollout.
20 per replica = 60 steady-state, 120 during rolling deploy.
This commit is contained in:
Graham McIntire 2026-04-06 09:38:47 -05:00
parent cef08fe1e3
commit 8cca7461d4

View file

@ -98,7 +98,7 @@ if config_env() == :prod do
config :microwaveprop, Microwaveprop.Repo,
# ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "50"),
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "20"),
# For machines with several cores, consider starting multiple pools of `pool_size`
# pool_count: 4,
socket_options: maybe_ipv6