none
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

    Question

  • Hi All

    I am getting below error pls advice.

    Inner Exception -> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
    Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider
    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Exception Name -> Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    Tuesday, July 02, 2013 9:51 AM

Answers

  • Hi All,

    I am getting below issue even though procedure takes very less time to execute.

    I have tried all work around posted but still facing problem. Please help!!

    Data -> System.Collections.ListDictionaryInternal

    Target Site -> Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action])

    Inner Exception -> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider

    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Exception Name -> Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    Monday, July 01, 2013 1:45 PM
  • Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider
    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. --->

    Unless you specify otherwise using the SqlCommand.CommandTimeout property, the .Net SqlClient Data Provider will wait no more than 30 seconds before cancelling the query and raising a timeout error.  You can set the CommandTimeout property to specify a longer value (in seconds) if a long-running query is normal and expected.

    Long-running queries can be a symptom of the need for query and index tuning or blocking.  Examine the query plan in SQL Server Management Studio by pressing CTRL-L with the query in a query window to make sure indexes are used efficiently, additional indexes are needed or query tuning is needed.  A quick way to identify blocking is by running sp_who2 while the query is running to see if BlkBy contains a SPID of a blocking session.

    If you need additional help, post your DDL (CREATE TABLE statements with constraints and indexes) and problem query.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Tuesday, July 02, 2013 10:54 AM
  • Hi Bhanu,

    Based on the error message, this issue can occur if the stored procedure execution time expands the “remote query timeout”. To troubleshoot the issue, I suggest performing the following steps:

    1. Check whether there is any block occurs with this store procedure. 
    2. Check whether the stored procedure execution plan is tuned and the statistics are up-to-date. 
    3. Specify where clause to return only the data we need rather than return all data from the table.

    There is a similar question on the following link, you can also refer to it:

    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated
    http://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation

    If you have any feedback on our support, please click here.


    Allen Li
    TechNet Community Support

    Wednesday, July 03, 2013 2:56 AM

All replies

  • Hi All,

    I am getting below issue even though procedure takes very less time to execute.

    I have tried all work around posted but still facing problem. Please help!!

    Data -> System.Collections.ListDictionaryInternal

    Target Site -> Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action`1[System.Action])

    Inner Exception -> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider

    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

    Exception Name -> Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    Monday, July 01, 2013 1:45 PM
  • Execption Type -> System.Data.SqlClient.SqlException
    Source -> .Net SqlClient Data Provider
    Details -> System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. --->

    Unless you specify otherwise using the SqlCommand.CommandTimeout property, the .Net SqlClient Data Provider will wait no more than 30 seconds before cancelling the query and raising a timeout error.  You can set the CommandTimeout property to specify a longer value (in seconds) if a long-running query is normal and expected.

    Long-running queries can be a symptom of the need for query and index tuning or blocking.  Examine the query plan in SQL Server Management Studio by pressing CTRL-L with the query in a query window to make sure indexes are used efficiently, additional indexes are needed or query tuning is needed.  A quick way to identify blocking is by running sp_who2 while the query is running to see if BlkBy contains a SPID of a blocking session.

    If you need additional help, post your DDL (CREATE TABLE statements with constraints and indexes) and problem query.


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Tuesday, July 02, 2013 10:54 AM
  • Hi Bhanu,

    Based on the error message, this issue can occur if the stored procedure execution time expands the “remote query timeout”. To troubleshoot the issue, I suggest performing the following steps:

    1. Check whether there is any block occurs with this store procedure. 
    2. Check whether the stored procedure execution plan is tuned and the statistics are up-to-date. 
    3. Specify where clause to return only the data we need rather than return all data from the table.

    There is a similar question on the following link, you can also refer to it:

    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated
    http://stackoverflow.com/questions/8602395/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation

    If you have any feedback on our support, please click here.


    Allen Li
    TechNet Community Support

    Wednesday, July 03, 2013 2:56 AM
  • Thanks for the answer. This was resolved. Other procedure in DB is blocking the records.

    Bhanu Prakash K

    Friday, July 12, 2013 7:01 PM