Timeout error when generating data in SQL Server 2014

Mike Beach 1 Reputation point
2022-05-09T10:31:02.497+00:00

Hi

We keep getting a timeout error when generating data in SQL Server 2014. We have tried changing the timeout settings but it doesn't seem to make any changes to the problem. "Error Message: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

Any help getting this resolved will be much appreciated.

Kind regards

200186-jsr6.png

200209-jsr7.png

200150-jsr8.png

SQL Server Other
{count} votes

3 answers

Sort by: Most helpful
  1. Naomi Nosonovsky 8,431 Reputation points
    2022-05-09T14:51:09.56+00:00

    Can you post the whole statement? Why you're using select top (100) percent ? What is the commandTimeout property set to (the default is 30 seconds, you may want to increase it)?

    0 comments No comments

  2. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-05-09T21:27:50.053+00:00

    What more exactly do you mean with generating data? It would help to know the exact operation.

    It does a little bit that it is a blocking issue. That is, you query is being blocked by an uncommitted transaction that is holding a lock, so maybe you should check for that.

    0 comments No comments

  3. Seeya Xi-MSFT 16,586 Reputation points
    2022-05-10T02:56:33.677+00:00

    Hi @Mike Beach ,

    Welcome to Microsoft Q&A!
    Regarding if it is a issue about blocking which mentioned by Erland, you can exec sp_who2 and check if there is content in the blkby colum.
    Of course, there are many other ways to see if it is a blocking issue.
    There are two ways to capture traces which may include reason about this issue in SQL Server. Extended Events (XEvents) and Profiler Traces. However, SQL traces using the SQL Server Profiler are deprecated. So it is not recommended.
    https://learn.microsoft.com/en-us/troubleshoot/sql/performance/troubleshoot-query-timeouts#troubleshooting-steps

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

    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.