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