Blocked process mystery
From: Stephen Brown (nospam_at_telusplanet.net)
Date: 09/20/04
- Next message: Ling: "Reindex and Error 1105"
- Previous message: Phillip Windell: "Re: Use datasource behind a dmz?"
- Next in thread: Olu Adedeji: "Re: Blocked process mystery"
- Reply: Olu Adedeji: "Re: Blocked process mystery"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 20 Sep 2004 11:03:57 -0600
This morning, we discovered that our application was timing out on several
pages. We tracked it down to a table that couldn't be read without timing
out. In Enterprise Manager, we found a table (TAB) lock on the table that
was of mode IS that was blocking other spids. The text property of the lock
showed this lock to be on a simple reporting stored procedure, which just
did a SELECT on a couple of tables that should have only taken a second or
two. We tried to debug the problem for several minutes, but to no avail.
Finally, we killed the lock and the database problem was immediately solved.
A look at SQL Profiler (which we run continuously) showed that a query that
matched the text property of the lock and had the same pid as the lock had
been started last Tuesday and ended at roughly the same time as we killed
the lock. The index name listed with the lock in Enterprise Manager also
was strange, since the index listed was not used by the stored procedure
listed in the properties.
We have had several similar problems with our database in the past, but this
is the first time we didn't resort to just a reboot. Why would a simple
stored procedure executing a select cause such problems? Why would this
procedure be allowed to run for a week? Why would we experience no problems
until days after (the table being locked was core to almost every page in
the system and was fine until this morning)? Can the index listed in the
lock information be used to debug the problem?
An even bigger question is how to handle such a problem after it occurs?
Killing the spid seems to have caused some problems in the dotNet
application and forced me to restart the app. Is there a more graceful
method of rolling back the offending process?
- Next message: Ling: "Reindex and Error 1105"
- Previous message: Phillip Windell: "Re: Use datasource behind a dmz?"
- Next in thread: Olu Adedeji: "Re: Blocked process mystery"
- Reply: Olu Adedeji: "Re: Blocked process mystery"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|