SQL Server error: Timeout expired. The timeout period elapsed prior to completion
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This is a client-side timeout (ADO.NET, ODBC, your app's connection library) giving up after waiting longer than its configured limit — it almost always means the query itself is slow, not that the network or server is broken.
Common causes
- Missing indexes forcing a table/clustered index scan on a large table
- Blocking — another session is holding a lock the query needs, and it's queued behind it, not actually running slow itself
- Outdated statistics causing the optimizer to pick a bad execution plan
- Parameter sniffing — a cached plan optimized for a very different parameter value
- A default command timeout (often 30 seconds) that's simply too short for a legitimately heavy report/batch query
How to fix it
- First determine if it's actually slow or blocked: check sys.dm_exec_requests / sys.dm_os_waiting_tasks for the session while it's running.
- If it's a genuinely slow query, get the actual execution plan and look for scans, missing index suggestions, and high-cost operators.
- If it's blocking, find the head blocker and address that session/transaction, not the one timing out.
- Update statistics (UPDATE STATISTICS) if the plan looks stale relative to actual data volume.
- Only raise the client timeout as a last resort — it hides the problem rather than fixing it.
Paste your slow query and execution plan here for a full diagnosis and optimized rewrite.
Try query analyzer free →