-
perf(db): shrink Postgres connection pool to cut idle-backend RSS
Release / frontend (push) Canceled after 0sRelease / linux (amd64) (push) Canceled after 0sRelease / linux (arm64) (push) Canceled after 0sRelease / windows (push) Canceled after 0sRelease / macos (push) Canceled after 0sRelease / release (push) Canceled after 0sBuild and Push Docker Image / build-and-push (push) Canceled after 0sreleased this
2026-06-14 13:10:11 +03:00 | 196 commits to main since this releaseEvery open pooled connection is a full Postgres backend process holding
its own private memory until closed, so the previous 10 idle / 25 open
pool was pure resident-RAM cost for a periodic-write monitoring workload
that rarely runs more than a few queries at once.This is the dominant app-side "Postgres RAM grows over time" lever on
managed deployments (dokploy) where we can't touch shared_buffers — the
DB config tuning from v0.7.1 only applies where the controller owns the
DB. Cut MaxOpenConns 25->10, MaxIdleConns 10->2, and add a 2-minute
ConnMaxIdleTime so idle backends are reaped quickly and their RAM
returned between bursts. ConnMaxLifetime (5m) still recycles active
backends to bound per-backend cache.Note: docker stats MEM includes reclaimable page cache, which fills
toward the container limit regardless — this lever reduces the anon
(true) RSS floor, not that cache number.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Downloads