none
Large Table Times out - Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding RRS feed

  • Question

  • We have a customer who is experiencing Time-outs in our .NET application which uses SQL Server as the backend.

    The table in question is the OrderLines table in a SQL Server Database that has 4155151 rows

    Lately, the customer has reported, that intermittently they would get these Time-Outs during the process of updating this table.

    The code doesn't have a specific Time-out set in the Connection String to the Database but on the SQL Server, the Time-out is set to 10 minutes.

    The error reported is as follows:

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

    at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)

    We have checked the Indexes for this table and it seems ok (see image attached).

    The customers IT guys have checked processes/tasks running on the server throughout the day, and did mention they recently updated to .NET 4.6.1 . Also, they mentioned they have plenty of RAM allocated and disk latency is fine and CPU is fine as well.

    Any ideas on how to trouble shoot this issue further?


    Monday, June 17, 2019 5:58 AM

All replies

  • The command timeout in a .NET application is by default 30 seconds, so if the timeout is the sole concern, change the timeout. You set it on the command object. 0 means "wait forever".

    The timeout of ten minutes you see in SQL Server applies when SQL Server runs queries against linked servers.

    If you feel that 30 seconds is too long execution time, we need to know more about the query. Keep in mind that the cause for the delay could be blocking.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Monday, June 17, 2019 10:01 PM