locked
Timeout RRS feed

  • Question

  • User-94466089 posted
    Does this message in Event Viewer mean that the query is bad written (slow) or that the DB server is having some other problems?
     
    Exception information: 
        Exception type: SqlException 
        Exception message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. 
     
    Request information: 
        Request URL: ...aspx 
        Request path: ...aspx 
        User host address: 127.0.0.1 
        User: ...
        Is authenticated: True 
        Authentication Type: NTLM 
        Thread account name: ..
     
    Thread information: 
        Thread ID: 5 
        Thread account name: ...
        Is impersonating: False 
        Stack trace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.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)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
       at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
       at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
       at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
       at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
       at System.Web.UI.WebControls.GridView.DataBind()
       at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
       at System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e)
       at System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e)
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    


     

    Monday, October 11, 2010 2:51 AM

Answers

  • User1992938117 posted

    try below options, set command timeout parameter to 0. It will execute till the end. By default it will timeout in 30 secs.

    sqlComm.CommandTimeout = 0;

    Check the timeout in connection string, try setting it to max...

    data source=ServerName;initial catalog=DataBaseName;uid=ID;pwd=Password;Connect Timeout=120.

     

    On the SQL Server also you can set timeout of a query. Check with SQL Server DBA's to know the Query time out set on servers.

    On IIS also you have timeout setting. In IIS --> Website tab --> Connection time out box . Set the max timeout value (in secs) IIS should maintain idle connection .

     check all these possibilities

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 11, 2010 2:58 AM

All replies

  • Monday, October 11, 2010 2:57 AM
  • User1992938117 posted

    try below options, set command timeout parameter to 0. It will execute till the end. By default it will timeout in 30 secs.

    sqlComm.CommandTimeout = 0;

    Check the timeout in connection string, try setting it to max...

    data source=ServerName;initial catalog=DataBaseName;uid=ID;pwd=Password;Connect Timeout=120.

     

    On the SQL Server also you can set timeout of a query. Check with SQL Server DBA's to know the Query time out set on servers.

    On IIS also you have timeout setting. In IIS --> Website tab --> Connection time out box . Set the max timeout value (in secs) IIS should maintain idle connection .

     check all these possibilities

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 11, 2010 2:58 AM