From 3ab50f53b0dd2bb041531ccf997aaedc733aa41a Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Fri, 30 May 2025 14:22:27 -0700 Subject: [PATCH] vectortile: Add more pg connections to avoid alarms --- cookbooks/vectortile/attributes/default.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/vectortile/attributes/default.rb b/cookbooks/vectortile/attributes/default.rb index 7ed27f6e6..cd9f594eb 100644 --- a/cookbooks/vectortile/attributes/default.rb +++ b/cookbooks/vectortile/attributes/default.rb @@ -17,6 +17,8 @@ default[:vectortile][:themepark][:version] = "beb454cc56e88533fb398ab293489c4e91 default[:postgresql][:versions] |= [node[:vectortile][:database][:cluster].split("/").first] default[:postgresql][:monitor_database] = "tiles" # As an absolute worst case, the server might have the serving, update, and a manual generation process going on. -default[:postgresql][:settings][:defaults][:max_connections] = (node.cpu_cores * 6 + 20).to_s +# Each of these connects to two databases, then we add more connections so 20% are unused and we're +# not tripping alarms. +default[:postgresql][:settings][:defaults][:max_connections] = (node.cpu_cores * 8 + 20).to_s default[:accounts][:users][:tileupdate][:status] = :role default[:accounts][:users][:tilekiln][:status] = :role -- 2.39.5