metricsign
Start free
Critical severityconnectivity

Power BI Refresh Error:
08006

What does this error mean?

The connection to the PostgreSQL server was lost unexpectedly during an active transaction or query.

Common causes

  • 1Network interruption between client and server
  • 2PostgreSQL server ran out of memory and killed the backend process
  • 3Server was forcibly restarted or crashed during query execution
  • 4TCP timeout on long-running queries without keepalive configured

How to fix it

  1. 1Step 1: Check PostgreSQL server logs for OOM kills or panic messages.
  2. 2Step 2: Enable TCP keepalives on the connection (`keepalives_idle`, `keepalives_interval`).
  3. 3Step 3: Verify the network path is stable — check MTU, packet loss with `ping` or `traceroute`.
  4. 4Step 4: Add retry logic with exponential backoff in the data pipeline.
  5. 5Step 5: If queries are long-running, consider `statement_timeout` to avoid holding connections.

Frequently asked questions

How do I prevent 08006 errors in automated pipelines?

Add retry logic with exponential backoff, validate data quality before loading, and monitor pipeline failures in MetricSign to catch this error early.

Official documentation: https://www.postgresql.org/docs/current/errcodes-appendix.html

Other connectivity errors