From 8cca7461d429954f4cf99191fcd5b20a9f271220 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 6 Apr 2026 09:38:47 -0500 Subject: [PATCH] Reduce DB pool size to 20 for 3-replica deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3 replicas × 50 connections exceeded max_connections during rollout. 20 per replica = 60 steady-state, 120 during rolling deploy. --- config/runtime.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/runtime.exs b/config/runtime.exs index 3c988385..10474812 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -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