Both server.ts files called createDb() on every /health request, creating a new postgres.js connection pool (~10 connections) that was never closed. Docker healthchecks hit this every 15s, exhausting max_connections within minutes and causing "too many clients" errors. Fix: use a fresh postgres.js client (max: 1) per health check that is properly closed in a finally block. This truly tests whether the DB is accepting new connections without leaking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| journal | ||
| planner | ||