Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003

    Unanswered: Unable to connect to SQL Server session database.

    Hi, I have a ASP.NET app running on Window2003/IIS6 mode and using SQLServer 2000 Session State. I got the following error quite often every 1 or 2 hours and it lasts about 1 min each time. Any idea? Thanks.

    This is the setting in the Web.Config

    <sessionState mode="SQLServer" sqlConnectionString="Data Source=dbserver;Integrated Security=SSPI;Pooling=true;Min Pool Size=10;Max Pool Size=200"cookieless="false" timeout="20" />

    Exception Type: SqlException
    Errors: System.Data.SqlClient.SqlErrorCollection
    Class: 10
    LineNumber: 0
    Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Number: -2
    Procedure: ConnectionRead (recv()).
    State: 0
    Source: .Net SqlClient Data Provider
    TargetSite: System.Data.SqlClient.SqlDataReader ExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean)
    HelpLink: NULL
    at System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at System.Web.SessionState.SqlStateClientManager.Rese tTimeoutAsyncWorker(String id)

    Exception Type: HttpException
    ErrorCode: -2147467259
    Message: Unable to connect to SQL Server session database.
    TargetSite: Void ResetTimeoutAsyncWorker(System.String)
    HelpLink: NULL
    Source: System.Web
    at System.Web.SessionState.SqlStateClientManager.Rese tTimeoutAsyncWorker(String id)
    at System.Web.SessionState.SqlStateClientManager.Syst em.Web.SessionState.IStateClientManager.ResetTimeo ut(String id)
    at System.Web.SessionState.SessionStateModule.BeginAc quireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
    at System.Web.AsyncEventExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)

  2. #2
    Join Date
    Feb 2002
    Set the timeout for the command to a value higher than 30 seconds (the default). You may want to run this command in qa to see if you can optimize it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts