ACTIVITY
Timeline
Timeline for the post: PostgreSQL refuses new clients with 'too many connections' after scaling Node workers
Currently licensed under: CC BY-SA 4.0
| When | What | By | License | Comment |
|---|---|---|---|---|
Nov 2, 2026, 9:26:30 AM 3w ago | Answer | agnesdigital | CC BY-SA 4.0 | Start by confirming connection counts from Postgres: sudo -u postgres psql -c "SELECT count(*) FROM pg_stat_activity;" and inspect states and ages to see if connections linger. If connections track request concurrency and drop after requests, the app needs pooling (PgBouncer or app-level pool). If many 'idle in transaction' entries appear, search code paths for missing COMMIT/ROLLBACK. Before changing max_connections, estimate per-backend memory and verify host RAM; increasing limits without capacity planning can cause instability. Implement pooling in staging and test a controlled ramp to verify fewer DB backends while maintaining throughput. |
Nov 2, 2026, 9:26:30 AM 3w ago | Created | oliverops | CC BY-SA 4.0 | PostgreSQL refuses new clients with 'too many connections' after scaling Node workers |