Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS Session hangs - How to resolve "website leaking resources to the finalizers"?

I am experiencing the exact same issue as a user reports on eggheadcafe, but don't know what steps to take after reading the following answer.:

Two problems you should chase down: 1. Why is the website leaking resources to the finalizers. That is bad 2. What is Oracle code waiting on -- work with Oracle's support on it

This is the issue:

I have an intermittent problem with a web site hosted on IIS6 (w2k3 sp2).

I appears to occur randomly to users when they click on a hyperlink within a page. The request is sent to the web server but a response is never returned. If the user tries to navigate to another hyperlink they are not able to (i.e. the web site appears to hang for that user). Other users of the website at the time are not affected by this hang and if the user with the problem opens a new http session (closing IE and opening the web site again) they no longer experience the hang.

I've placed a debugger (IISState) on the w3wp process with the following output. Entries with "Thread is waiting for a lock to be released. Looking for lock owner." look like they might be causing the issue. Can anyone tell what lock the process is waiting on?

Thanks

http://www.eggheadcafe.com/software/aspnet/33799697/session-hangs.aspx

In my case my .Net C# MVC application runs against a MySQL database for data and a MS SQL database for .Net membership.

I hope someone with more knowledge of IIS can help resolve this problem.

like image 701
CLRBTH Avatar asked Nov 14 '22 03:11

CLRBTH


1 Answers

It sounds like you have a race condition in your database calls resulting in a deadlock at the database level. You may want to look at the settings you have in your application pool for database connections. Likely you will need to put some checks in somewhere or redefine procedures in order to reduce the likelihood of the race:

http://msdn.microsoft.com/en-us/library/ms178104.aspx

like image 133
Joel Etherton Avatar answered Feb 17 '23 14:02

Joel Etherton