Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aspnet_wp recycled?

Status
Not open for further replies.

newtoASP

Programmer
Jun 1, 2001
40
US
User are experiencing the browser (IE only) hanging at seemingly random intvervals.
The following is from the event viewer:

Event Type: Error
Event Source: ASP.NET 1.1.4322.0
Event Category: None
Event ID: 1003
Date: 7/13/2004
Time: 7:31:39 AM
User: N/A
Computer:
Description:
aspnet_wp.exe (PID: 3624) was recycled because it was suspected to be in a deadlocked state. It did not send any responses for pending requests in the last 180 seconds. This timeout may be adjusted using the <processModel responseDeadlockInterval> setting in machine.config.

How can I tell what is causing a deadlock and can I do anything about it?

Also, the following error is generated from my connection string class, why do I get a ThreadAboutException?:

1) Exception Information
*********************************************
Exception Type: System.Exception
Message: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.WaitHandle.WaitOneNative(IntPtr waitHandle, UInt32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at MandT.CAD.ACE.BusinessTier.ACEConnString.GetInstance()
....



Public Class ACEConnString

Private Shared _instance As ACEConnString

Private Shared _connString As String

Private Shared _mutex As New System.Threading.Mutex



Private Sub New()

_connString = ConfigurationSettings.AppSettings("connstring")

End Sub

Public Shared Function GetInstance() As String

_mutex.WaitOne()

If _instance Is Nothing Then

_instance = New ACEConnString

End If

Return _instance._connString

End Function

End Class




Thanks - Greg
 
A deadlock is an OS term that refers to the condition that two processes or threads are waiting on the same resource, and it happens when you use mutual exclusion locks. Lets say that thread A has obtained lock X and is currently waiting for lock Y to be free. Lock Y is held by another thread, B, which is waiting for lock X before it releases Y. This is a deadlock.

In this case, neither thread can continue because it is waiting to get the lock on one resource before it releases the resources it already has locks on.

There are a couple techniques to fix this and prevent it from happening. You can use one of the overloaded versions of WaitOne to only wait for a certain amount of time. If you haven't gotten the mutex lock after that time, release your other mutex locks, sleep for a while, and then try to get them all back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top