PostgreSQL connection_failure
An established PostgreSQL connection failed while the client was using it, leaving the current operation interrupted or uncertain.
connection failureAlso searched as: connection_failure · server closed the connection unexpectedly
What it means
The client lost a session because of server termination, network interruption, proxy timeout, process failure, or protocol-level disruption. The SQLSTATE alone does not establish which layer failed.
Typical trigger conditions
- Database restart or failover
- Load balancer or firewall idle timeout
- Backend process crash
- Network path interruption
First diagnostic checks
Correlate both ends
Compare application, pooler, PostgreSQL and infrastructure events by timestamp and connection identity.
Test a fresh connection
Determine whether the endpoint is currently reachable without reusing the failed pool session.
pg_isready -h <host> -p <port> -d <database>
Review timeout layers
Compare client, pooler, proxy, firewall and server keepalive settings.
Version and platform notes
The class 08 SQLSTATE is stable; the accompanying driver exception and server log usually provide the discriminating evidence.
Related engineering templates
Follow PostgreSQL failures and fixes
A useful digest about twice a week with new error references, tools, integration notes and production lessons. No daily noise.