A situation caused by two or more processes being unable to proceed (and thus release their locks) because they are blocked by locks on resources held by the other process.
6
votes
2answers
2k views
Why does this query cause a deadlock?
Why does this query cause a deadlock?
UPDATE TOP(1) system_Queue SET
[StatusID] = 2,
@ID = InternalID
WHERE InternalID IN (
SELECT TOP 1
InternalID FROM system_Queue
WHERE ...
4
votes
2answers
2k views
Determine Reason for Deadlock in MySQL
We've been seeing some deadlocks occur but have not been able to reproduce. Is there any way to determine, after the fact, what queries were running, etc to figure out why deadlock occurred?
6
votes
3answers
412 views
Inserting and updating and selecting at thousands of times per second
I have a table that gets inserted, updated and selected from thousands of times within one second. I am having deadlock issues though.
The database has 2-5 simultaneous 1000+ row inserts using Linq ...
10
votes
2answers
3k views
Code to simulate deadlock
I am testing my application I need some code that stable simulates the deadlock on database site (sql script if possible).
Thank you.
ADDED:
Reproducing deadlocks involving only one table
25
votes
5answers
15k views
What are the main causes of deadlocks and can they be prevented?
Recently one of our ASP.NET applications displayed a database deadlock error and I was requested to check and fix the error. I managed to find the cause of the deadlock was a stored procedure that ...