Does dead lock cause timeout issue in sql server 2017?

kumar-9444 121 Reputation points
2023-08-11T12:46:06.73+00:00

Application is facing timeout issue . when we checked from sql server(2017) end, we found dead lock in sql server . Will this caused to timeout?

SQL Server Other
{count} votes

3 answers

Sort by: Most helpful
  1. Dan Guzman 9,401 Reputation points
    2023-08-11T15:16:23.65+00:00

    Long-term blocking may cause query timeouts but deadlocks typically do not because SQL server will rollback one of the sessions involved before queries timeout.

    Deadlocks and blocking are often a symptom that query/index tuning is needed. Inefficient queries scan more data than needed. Not only do inefficient queries take longer to run, they lock more data which increases the likelihood of deadlocks/blocking with concurrent queries.


  2. Javier Villegas 900 Reputation points MVP
    2023-08-11T16:32:40.28+00:00

    Additionally to what Dan has mentioned you can create an Extended Events Session on your instance to detect the timeouts

    See this question which was answered and provide an example of how to create the session

    0 comments No comments

  3. Anonymous
    2023-08-14T01:59:40.5833333+00:00

    Hi @kumar-9444

    As a supplement, you can refer to the deadlock guide.

    https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-deadlocks-guide?view=sql-server-2017

    Best regards,

    Percy Tang

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.