SQL Timeout exceptions for asp.net 2.0 apps

Answered SQL Timeout exceptions for asp.net 2.0 apps

  • Friday, May 04, 2012 10:35 AM
     
     

    I am frequently receiving below SQL timeout exceptions for some of my asp.net 2.0 applications, ADO.NET settings are configured with default values. Some times end users ae receiving error page in Application.

    Database Error ---> System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

       at System.Data.SqlClient.SqlDataReader.get_MetaData()

       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

All Replies

  • Friday, May 04, 2012 3:17 PM
    Moderator
     
     

    Hello,

    The default timeout for the execution of a command is 30 seconds.

    Please, could you provide an example of commands which are giving timeouts or is it absolutely random ?

    Please, could you provide the full version ( 2000,2005,2008,2008 R2,2012 + last installed service pack ) and edition ( MSDE , Express , Web , Standard , Entreprise,...) ?

    We are waiting for your feedback to try to help you more efficiently.

    Have a nice day

    PS : as you may have about TDSParse, i would suggest to have a look at this link

    http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/f014460c-471b-4a1d-99a3-bb1545dbedb2


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

  • Tuesday, May 08, 2012 8:43 AM
     
     

    Timeouts were happening in Random, if default timeout of command is the issue, how i can collect more statistics to prove the issue.

    SQL server 2008 R2 64 bit & OS- Windows Server 2008 R2 Enterprise

  • Tuesday, May 08, 2012 10:43 AM
    Moderator
     
     Answered

    Hello,

    just an excellent ( but too often unknown ) article about timeout with SQL Server (login/commands)

    http://blogs.msdn.com/b/mattn/archive/2008/08/29/sqlclient-timeouts-revealed.aspx

    I go on to search

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    • Marked As Answer by KJian_ Thursday, May 10, 2012 6:00 AM
    •