question

DennisBenedetto-8167 avatar image
0 Votes"
DennisBenedetto-8167 asked AmeliaGu-msft answered

MSDN Forum: Execution Timeout

How to/ is it possible to:
configure the execution time out at the sql user level?

I have tried to view the connection properties and see the execution time out value but all the connection properties are greyed out - both as an existing user and as a new user.

What am I trying to accomplish?

I have long running queriers and the server is set to a default timeout of 600 seconds. That's fine, but for sql users that the website utilizes, I want the execution time to be much shorter. THe sql execution time out setting should not exceed the web server's page load timeout setting - and that doesnt need to be 600 seconds, it shoudl be no more than 90 seconds, and even that is at the high end of how long I would expect a person to wait for a page to load.

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TomPhillips-1744 avatar image
0 Votes"
TomPhillips-1744 answered

SQL Server does not have a timeout for queries. That is an application setting.

See:
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtimeout?view=dotnet-plat-ext-5.0

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

As Tom says you are looking in the wrong place. The query timeout is a client-side setting. The 600 s you have found applies when SQL Server acts as a client for linked servers.

The timeout you are looking for is on the command object of your client API. For most APIs it is 30 seconds, but there are a few sensible ones that have 0, that is wait forever.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AmeliaGu-msft avatar image
0 Votes"
AmeliaGu-msft answered

Hi DennisBenedetto-8167,

Agree with others.
In addition, please refer to Setting the command timeout with the latest .NET SqlClient which might help.

Best Regards,
Amelia


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.