Files
ntfy/db/pg
binwiederhier 11acdd2a31 Keep Postgres pool connections idle instead of re-opening them
Without pool_max_idle_conns, database/sql keeps only 2 idle connections, so
any burst above that closed connections after use and re-opened them on the
next query: a DNS lookup, TCP + TLS handshake and SCRAM auth per query. Under
load this shows up as HTTP 500s whenever the resolver hiccups ("hostname
resolving error"). ntfy.sh runs pool_max_conns=30 without an idle setting, so
it churns connections the same way.

pool_max_idle_conns now defaults to pool_max_conns.
2026-10-03 15:21:57 +00:00
..