session record in ASPStateTempSessions remains locked indefinitely

Tech-Archive recommends: Fix windows errors by optimizing your registry




error:

System.Web.HttpException: Exception of type System.Web.HttpException was
thrown. ---> System.Web.HttpException: Unable to connect to SQL Server
session database. ---> System.Data.SqlClient.SqlException: General network
error. Check your network documentation.

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

at System.Data.SqlClient.SqlCommand.ExecuteReader()

at System.Web.SessionState.SqlStateClientManager.DoGet(String id, SqlCommand
cmd)

--- End of inner exception stack trace ---

at System.Web.SessionState.SqlStateClientManager.DoGet(String id, SqlCommand
cmd)

at System.Web.SessionState.SqlStateClientManager.GetExclusive(String id)

at
System.Web.SessionState.SqlStateClientManager.System.Web.SessionState.IStateClientManager.BeginGetExclusive(String id, AsyncCallback cb, Object state)

at System.Web.SessionState.SessionStateModule.GetSessionStateItem()

at
System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object
state)

--- End of inner exception stack trace ---

at System.Web.HttpAsyncResult.End()

at System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar)

at System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar)

symptom:

we occasionally experience a large number of persistent locks requests for
specific sessionid on the sql state server used by our web apps.

from our experimentation.

if a sessionid in the ASPStateTempSessions has it's field locked, set to 1
and not set back to 0, and another request is made for the same session the
locking behavior above occurs resulting in the error above.

we have not been able to replicate it well.
we typically experience it under heavy load.
any additional information anyone could provide would be greatly appreciated.

-seth

.



Relevant Pages

  • Re: Time out errors
    ... Dim cmd as New SqlCommand ... ' code to execute a stored proc ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Time out errors
    ... Using cnn As New SqlConnection ... Using cmd As New SqlCommand ... because of existing open connections that were never disposed. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: BUG? SqlCommand incorrectly reports The SqlCommand is currently b
    ... What purpose does cmd2 have? ... cmd for both. ... > public static SqlCommand cmd = new SqlCommand; ... >> iterates over the reader and closes the reader ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Transaction Commit TimeOut but Transaction still completes
    ... Private Function GetSomething(ByVal cmd As SqlCommand) ... Hi Huan, ... > I'm faced with a weird problem that happens once a week in a production ...
    (microsoft.public.dotnet.framework.adonet)