Reputation: 676
I have an ASP.NET website (.Net 4, IIS 7, C#). From time to time the database has a deadlock when a person requests a record update. When that happens the whole website hangs, even pages that do not access the database.
My question is, is this normal behavior for ASP.NET apps? One page hangs and then the rest of the website hangs? If not is there a setting in IIS that would prevent this or a way to code the app that would prevent this?
Upvotes: 1
Views: 555
Reputation: 63956
My question is, is this normal behavior for ASP.NET apps? One page hangs and then the rest of the website hangs?
Definitely not. What's likely happening is not that the website hangs because there's a deadlock in the database but rather because you have some sort of resource leakage (memory, exhausting the # of threads to serve requests, CPU, etc.) that's causing the application to become unresponsive. In fact, you may think that the database is the culprit of this but I am more inclined to think that your code is the issue. Usually when there's a deadlock in a database (at least on SQL Server) one of the queries involved in the deadlock is automatically killed.
Upvotes: 2