Medium severitytimeout
Power BI Refresh Error:
-2
What does this error mean?
The client-side query timeout elapsed before SQL Server returned a result — the connection was terminated by the client.
Common causes
- 1A long-running query exceeds the 30-second default Command Timeout in ADO.NET or ODBC
- 2A blocking chain causes the query to wait for a lock longer than the timeout allows
- 3Power BI or ADF uses the default timeout which is too short for a complex transformation query
How to fix it
- 1Step 1: Identify whether the query itself is slow or blocked: check sys.dm_exec_requests for the session — if wait_type is LCK_*, it is blocked; if CPU or IO, the query itself is slow.
- 2Step 2: For ADF, increase the query timeout in the dataset or activity settings — set Command Timeout to 0 (no timeout) for long-running ETL queries.
- 3Step 3: Optimize the slow query: run it in SSMS with Actual Execution Plan, add missing indexes, or reduce the dataset being processed.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors