1

Following error comes while executing an SQL query.

Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

This happens after 30 seconds, even though I have set the Command Timeout property to 300 seconds.

Here’s what I’ve already verified:

The connection is working fine. I've checked the remote query timeout, and it's set to 0 (unlimited). There are no packet drops or network issues. The query is optimized, properly indexed, and runs in seconds directly on SQL Server. There are no deadlocks, blocking processes, or transactions affecting the command. Connection pooling is not in use, and SQL logs show no issues.

Any suggestions or insights on what could be causing this issue would be greatly appreciated!

3
  • 4
    How, exactly, are you running the query? From SSMS, sqlcmd, custom app? Commented Feb 5 at 11:48
  • 2
    There's a timeout on the server, but there's also a timeout on the client. 30 seconds is the default for lots of client-side connections. I'll bet that's what's happening. Commented Feb 5 at 13:01
  • Does the query use Linked Servers and / or make remote calls? Commented Feb 5 at 13:06

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.