PostgreSQLRunbook 0/2 done
08006
PostgreSQL Error 08006: Connection failure
Critical↻ Retryable · exponential backoffHTTP 503 Service UnavailableNetwork
TL;DR · 10-second read
The TCP connection to Postgres dropped mid-session (failover, restart, idle timeout at a proxy). Reconnect with backoff and set keepalives so pooled connections are validated.
Identify: does your log match?
What you see · exact log / response
Error: Connection terminated unexpectedly
at Connection.<anonymous> (/app/node_modules/pg/lib/client.js:132:73)
SQLSTATE 08006: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.Fix
Being written
Copy-paste fixes for 08006 are in the enrichment queue
The summary above is verified. Paste your full trace into the decoder for a diagnosis now.
Open the decoder →Related errors
Last verified 2026-10-12 · Source: Official Appendix A error codes (errcodes.txt in the postgres repo) · Official docs ↗ · ~3,600 searches/mo