MetricSign
EN|NLRequest Access
High severityconnectivity

Power BI Refresh Error:
Database Error: Redshift Connection Timeout

What does this error mean?

dbt failed to connect to Amazon Redshift, or a running query was terminated due to a connection timeout. This can be a network timeout, an idle session timeout, or a WLM (Workload Management) queue timeout.

Common causes

  • 1Redshift cluster idle session timeout (default 1 hour) closing dbt's connection mid-run
  • 2WLM queue timeout killing long-running dbt queries before completion
  • 3VPC security group or network ACL blocking the dbt runner's IP address
  • 4Redshift cluster in maintenance mode or resizing
  • 5TCP keepalive not configured on the dbt host, causing idle connections to be dropped by NAT/firewall

How to fix it

  1. 1Set `keepalives_idle: 60` in the Redshift profile in profiles.yml to prevent idle connection drops
  2. 2Increase the Redshift WLM query timeout for the queue used by dbt
  3. 3Configure the Redshift parameter group: increase `statement_timeout` for long dbt models
  4. 4Verify network connectivity: run `psql -h <cluster_endpoint> -U <user> -d <db> -p 5439 -c 'SELECT 1'` from the dbt runner
  5. 5If using a VPN or Bastion, ensure TCP keepalive is also configured on the network appliance
  6. 6Check the Redshift system table `stl_connection_log` for connection termination events

Frequently asked questions

Where is `keepalives_idle` configured for the Redshift dbt adapter?

In your `profiles.yml` under the Redshift target: add `keepalives_idle: 60` (seconds). This configures the TCP keepalive to send probes every 60 seconds on idle connections.

Other connectivity errors