IIS Deadlock Issue

dotnet framework

IIS Deadlock Issue

Postby TUt1YmljaW5h » Fri, 14 Dec 2007 02:00:01 GMT

Wee continuing having a problem with a production application. The 
application uses ASP.NET web services and about once a day, the web services 
stop responding. The only resolution is to restart IIS or wait until IIS 
detects that there is a deadlock issue and resets itself. We are constantly 
seeing an event show in the event log. After this event appears, IIS resets 
itself and starts working again. The event is below.

Can anyone help me troubleshoot this issue?

Event Details
Event Type:	Warning
Event Source:	W3SVC-WP
Event Category:	None
Event ID:	2262
Date:		12/12/2007
Time:		9:43:23 AM
User:		N/A
Computer:	FDYRS946
Description:
ISAPI 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll' 
reported itself as unhealthy for the following reason: 'Deadlock detected'.


Re: IIS Deadlock Issue

Postby tiago.halm » Fri, 14 Dec 2007 02:39:24 GMT

When the web service deadlocks (hangs) run iisdump.exe.
After the dump finishes, run windbg.exe (get the latest version), load
the dump file and inside windbg do:


the "~*e !clrstack" command gives you the stack of the all the managed
threads and should help you to see where the deadlock is taking place.

Other instructions you may want to follow (where the scenario is
similar to yours) are available here:
 http://www.**--****.com/ 

hope it helps,
Tiago Halm

Similar Threads:

1.Deadlocks and DataSets general issue

I'm in the process of writing some generic dataaccess code to save
datasets to the database (generating SQL etc.)

I've not had a problem yet but I'm just checking in case anyone else
understands this better than me.

Any feedback appreciated.

If I have a dataset with two related tables (parent-child) then I
probably also want to save the dataset in a single transaction. In
this case, I need to do inserts and deletes in a different order so as
not to violate FK contraint in the database.
i.e. 
-When inserting data: We must insert parent records first and then
insert child data second.
-When deleting data: We must process the datatables in the opposite
order, in other words delete from the child records first and then
delete from parent records second.

Now in my mind this is at odds with the stragegy for avoiding
deadlocks which is that you should process tables in the same order.
i.e. 
-Client 1 saves dataset that has deleted rows in 2 related tables
-Client 2 saves dataset that has inserted rows in same 2 tables
If both updates start at same time...
1-Client 1 locks child table
2-Client 2 locks parent table
3-Client 1 tries to lock parent table, but is blocked by Client 2
4-Client 2 tries to lock child table but is blocked by Client 1
5-Deadlock!

That was all just the background... these are my questions:
"Is it true that trying to update data from multiple tables is likely
to result in deadlocks?"
"Does it depend on how much of table/page/row is locked in the
database"

Thanks,
MikeG

2.IIS 6 vs IIS 5 ASP.NET Performance Issues

I have currently developed an intranet asp.net (v1.1.4322 framework)
app on a Windows XP Pro machine running IIS 5 with all patches. The
backend is an Access database utilizing ADO.NET.

My problem is the app runs perfectly on IIS 5, but when moved to
production on a Windows 2003 box running IIS 6 (v1.1.4322 framework)
with all patches (and ample hardware), performance degrades to the
point the app is almost useless.

The slow down is occurring during database access on both the local
machine and remote machines. I know that many will point out that the
database and access to it needs analyzed to see if it is the culprit,
but it runs perfect under IIS 5, so it is definitely something with
Win2k3 / IIS 6, or both.

I have read several posts stating that using basic authentication and
changing it to IIS 5 isolation mode would do the trick, but that
wasn't the case.

I've also read that specifically setting the datatype of the paramters
on an update (rather than allowing the Dataset to do it) can improve
performance. The issue with that fix, and the reason why I'm not going
this route, is that it is not a problem under IIS 5, only IIS 6, and
is obviously an IIS / Win2k3 issue, and not a coding issue.

It may be an IIS setting or an application setting that isn't obvious.
Whatever the case, I'm completely frazzled...

This is an issue that needs resolved ASAP, as we can't fallback to IIS
5...

Any help would be greatly appreciated!

Thanks in advance

3.deadlock issue

Hi

I think I have a deadlock issue that I can't seem to avoid. Basically, I
have a service firing remote events, and an event sink on the same machine
processing those events. The remote events are no problem, they arrive just
fine. However, then my communicator class sends the events to my GUI class,
which is supposed to process them. I have two events, one that results in
the application icon to be changed (and works just fine), and one that's
supposed to add a text line to a RichTextBox of my application.
While the event is properly fired by the communicator class and properly
received by the GUI class, the GUI class class can't process it. If I have
the GUI class just dump the contents of the event to the commandline, things
work just fine. However, if I want to add the text received with the event
to my RichTextBox via RichTextBox.AppendText(), then my application stops
responding for good.

So far I'm not using any threading so it can't be that the event is fired
from another thread context, but just for the heck of it, I created an
additional method in the GUI that does just the GUI update, and have my
event receiver call it via myGuiClass.Invoke(new
EventListener(GUIUpdateMethod)), but that doesn't help either.

Any ideas?

Regards
Stephan


4.DeadLock Issues

Hi all,

We are running on W2K3, 64 bit, IIS6.. and recently started getting the 
following..

ISAPI 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll' 
reported itself as unhealthy for the following reason: 'Deadlock detected'.

The worst part is what follows..
1. Application pool creates a new worker process and tried to shutdown the 
old worker process.
2. The old worker process fails to shutdown
3. The new worker process fails with the same deadlock issue.
4. Eventually, we have approx 20 worker processors and all memory is 
consumed or aspnet fails.
5. The old worker processors can not be killed and the server must be 
rebooted. 

It is extremely annoying to have to end up rebooting a server but nothing we 
have done enables us to remove/kill the w3wp's.

1. How can we find out what is causing the deadlock?
2. Why would a deadlock result in the issues we are experiencing and end 
with a server reboot?

Thanks.


5.Deadlock issue

When I run my application, I've got the error:

"Transaction (Process ID 101) was deadlocked on lock resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction."

Anyone can advise me on what's wrong? Thanks!

6. IIS issues

7. Issues hosting WCF web service object in IIS

8. IIS issue with ASP.NET 2.0



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 19 guest