SQLSTATE 08003 ERROR Class 08: Connection Exception

connection_does_not_exist there is no client connection — 08003

PostgreSQL error “there is no client connection” (SQLSTATE 08003, connection_does_not_exist): what it means, common causes, and how to fix it.

PG 15, 16, 17, 18, 19 Official docs
Last reviewed May 2026 Grounded in source
Production impact Medium Competency Connections & Pooling Career Resolve "too many connections" live Frequency Occasional

Investigation

Symptoms

A statement failed with SQLSTATE 08003 (connection_does_not_exist), reported at severity ERROR. This is a Connection Exception condition: PostgreSQL emits the message there is no client connection.

  • The client receives SQLSTATE 08003 (connection does not exist).
  • The operation is rejected at ERROR level; the statement does not complete.

What the server log shows

ERROR:  there is no client connection

Why PostgreSQL raises this

Class 08 (Connection Exception) covers failures establishing or maintaining the client/server or replication connection. PostgreSQL raises it when the transport, handshake, or authentication channel breaks before or during a session.

As described in PostgreSQL’s Section 34.1 Database Connection Control Functions and Appendix A (PostgreSQL Error Codes), SQLSTATE 08003 carries the condition name connection_does_not_exist in class Connection Exception. (Paraphrased — see the linked reference for the exact wording.)

Common causes

  • The server is down, restarting, or not listening on the expected host/port.
  • A network device, firewall, or proxy dropped or refused the connection.
  • TLS/GSS negotiation or the startup handshake failed.
  • The session was terminated by the server or a timeout.

How to fix it

  1. Confirm the server is up and accepting connections (pg_isready).
  2. Verify host, port, and listen_addresses reachability.
  3. Check firewalls, security groups, and any connection pooler in the path.
  4. Inspect the server log around the disconnect for the underlying cause.

Version applicability

This message is present in PostgreSQL 15, 16, 17, 18 and 19.

Related & next steps

Reference: PostgreSQL Section 34.1 Database Connection Control Functions.

Keep going

Related & next steps

Was this helpful?