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.

learn more… | top users | synonyms

1
vote
1answer
251 views

How can I make a select statement get blocked?

Hello I am trying to intentionally make a SQL select statement get blocked by another simple SQL delete or update statement, for the purpose of learning. I prefer only InnoDB tables. To prepare the ...
2
votes
2answers
295 views

How to rollback the identity seed after deadlock

Now that's an approximate sequence of operations Im performing: SET IDENTITY_INSERT <table-name> ON; INSERT SOMETHING to <table-name> with explicitly specifyed id DECLARE @oldID bigint ...
1
vote
0answers
105 views

Concurrent Access causing deadlock on the same table [closed]

Transaction 1 : SELECT distinct column_id from grid where row_id = @P0 Transaction 2 : INSERT INTO grid (grid_id, row_id, column_id) In this table grid grid_id is primary key clustered. ...
0
votes
1answer
175 views

how to avoid deadlock while updating 2 rows in mysql [duplicate]

This is a interview problem. There is a perl program that updates the database, and it could run in different processes. One process may execute a transaction like: update row A -> update row B -> ...
30
votes
5answers
22k 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 ...
0
votes
1answer
369 views

postgres deadlock without explicit locking

I use PostgreSQL 9.2, and I do not use explicit locking anywhere, neither LOCK statement nor SELECT ... FOR UPDATE. However, recently I got ERROR: 40P01: deadlock detected. The query where deadlock ...
1
vote
1answer
541 views

Understanding Deadlock graph on one table

I do not understand this deadlock graph that we are experiencing on this table (I have had to redact the exact column names) I have not had much exposure to deadlocks outside of reading material and ...
11
votes
2answers
2k views

Deadlocks From Locks on Same Temporary Tables In Different Processes

I have found a deadlock that appears to show something I thought was impossible. There are two processes involved in the deadlock: 1. process8cf948 SPID 63 Performing an ALTER TABLE on temporary ...
0
votes
1answer
135 views

sql server 2005 deadlock error 3930

I am trying to simulate a solution for a deadlock issue happened on our production server. Run this to create a table to be used in 2 and 3. IF (SELECT OBJECT_ID('dbo.MyProduct') ) IS NOT NULL ...
2
votes
1answer
123 views

When and why can this kind of deadlock occur?

------------------------ LATEST DETECTED DEADLOCK ------------------------ 130409 0:40:58 *** (1) TRANSACTION: TRANSACTION 3D61D41F, ACTIVE 3 sec inserting mysql tables in use 1, locked 1 LOCK WAIT ...
0
votes
3answers
1k views

How to avoid deadlock while updating 2 rows in MySQL

This is a interview problem: There is a perl program that updates the database, and it could run in different processes. One process may execute a transaction like: update row A -> update ...
13
votes
5answers
2k views

Handling concurrent access to a key table without deadlocks in SQL Server

I have a table that is used by a legacy application as a substitute for IDENTITY fields in various other tables. Each row in the table stores the last used ID LastID for the field named in IDName. ...
1
vote
1answer
452 views

sp_getapplock doubt

We are using sp_getapplock as a transaction level in a procedure which in turn calls another procedure where again we use sp_getapplock with the same resource names. I wanted to know whether this ...
3
votes
1answer
317 views

How this simple Stored Procedure ended up in Deadlock

Thanks for all and this forum is really helpful. After few minutes of system running we get “Try restarting the transaction.” And its end up in deadlock. We use MySQL 5.5.28 and the Java code ...
1
vote
0answers
164 views

Why Am I Getting Deadlock - Please Read Trace

can anyone help me? i'm getting deadlock on this trace, i'm using symmetricds and i can't understand why i'm getting a deadlock on a certain table. I'm using sql server 2008 r2, ...
0
votes
1answer
62 views

Pessimistic locking worst case

We are using Java EE. And are making an apllication where in the worst case, aloot of message queue messages willl come form the same User. Therefore we are looking on Pessimistic, SELECT FOR UPDATE ...
3
votes
1answer
572 views

Deadlocks on same wait resource

I am experiencing a deadlock in SQL Server, but I do not understand why this is a deadlock. It looks like the two resources are actually the same. Meaning that they each have the lock and are asking ...
1
vote
1answer
85 views

Appropriate Action for Dead Locks / Blocking

I've setup my databases so that anytime a procedure is blocked for more than 45 seconds the database notifies the DBA email. Is it bad practice to setup a way to auto kill the process that is doing ...
1
vote
2answers
523 views

SQL Server deadlock too long [closed]

I have a really weird problem with a deadlock between a business process and a monitoring job. The both were involved on a deadlock that lasted around 5.5 hours. I don't know why SQL Server took so ...
1
vote
1answer
273 views

How do I understand this deadlock?

I have two threads doing inserts into a table at the same time, causing a deadlock. The interaction with the table is in a new transaction, so I'm pretty confident there is nothing else going on here. ...
6
votes
3answers
512 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 ...
6
votes
2answers
268 views

SQL Server Select Count READ_COMMITTED_SNAPSHOT QUESTION

I seem to be getting a lot of deadlocks when doing select count(*) on a particular table. I have already changed all the required parameters and made them into row only locking. I've also changed the ...
2
votes
1answer
830 views

How do you avoid a foreign key constraint creating deadlocks?

So I have two tables that create a deadlock. The application literally do nothing but update two different tables in two different transactions. There is a foreign key constraint (not cascading, just ...
6
votes
1answer
448 views

Deadlock on Merge replication

I'm having a really confusing problem on the msmerge_contents table on some of my merge replication databases. It seems I'm receiving a dead lock on the exact same row on the same index on the table ...
6
votes
1answer
1k views

SQL Server Deadlock on two updates due to index lock order

I have two UPDATEs - one locks the CI first and then the NCI (on status) because the status column is also being updated. The other already owns a U lock on the NCI because it knows it is changing ...
0
votes
1answer
412 views

MySQL InnoDB locking on combined UPDATE-JOIN statements

on querying statements which contain an UPDATE combined with JOIN, we are getting the following errors: Statements writing to a table with an auto-increment column after selecting from another table ...
9
votes
3answers
625 views

Need Help Troubleshooting Sql Server 2005 Deadlock Scenario

I am running into a deadlock scenario where the only participants in the deadlock appear to be a single table and a single stored procedure that deletes from that table. I drew that conclusion based ...
6
votes
1answer
373 views

Deadlock graph with a lock on an index on a seemingly unrelated table

I have a deadlock graph from a deadlock where one process is doing a SELECT and one is doing an UPDATE. This seems like the classic case where the SELECT gets a NCI lock to perform a join and then a ...
-3
votes
2answers
3k views

SQL Server - How many type of timeout can happen, and how?

When working with SQL Server, there can be multiple application host accessing it, and each application can have one or many connection. Each connection can potentially have multiple transaction ...
4
votes
2answers
1k views

Deadlock on insert for a table with an insert trigger that updates column in same triggered table

By specification each table uses a guid as the primary key. Another requirement is that each resource requires a 6 number identifier (100001, 100002, ...) as a public id that is unique within the ...
2
votes
0answers
293 views

SQL Server 2008 R2 - Deadlock Trace, Need Help Understanding It

I really need help on understanding this deadlock, i've already replaced the values, mind if anyone helps me interpreting where my deadlocks are coming from? What does e_waitpipegetrow mean? btw, i'm ...
7
votes
1answer
2k views

Deadlock error isn't returning the deadlock SQL

Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. I am getting this error randomly when one of my ...
1
vote
2answers
407 views

How long can Deadlock info hold in innodb status page?

When I run SHOW ENGINE INNODB STATUS\G, I can see this timestamp ------------------------ LATEST DETECTED DEADLOCK ------------------------ 121118 17:14:31 Questions Any idea how long Deadlock ...
4
votes
2answers
173 views

Deadlock during Slony uninstall and concurrent access of DB

I am using slony1-2.0.4.rc2 and postgresql-8.4.0-0. I faced a deadlock in the slony uninstall process. I was trying to uninstall node from a cluster, as per slony's documents this requires access ...
4
votes
2answers
1k views

SELECT/INSERT Deadlock

This instance hosts the SharePoint 2007 databases (SP). We have been experiencing numerous SELECT/INSERT deadlocks against one heavily utilized table within SP content database. I have narrowed down ...
2
votes
3answers
4k views

How can I configure MySQL Innodb to handle 1000s of inserts per hour?

I have a very high traffic website where it is possible that 1000s of new records are inserted every hour. This one error is crippling the site: PDOException: SQLSTATE[40001]: Serialization failure: ...
3
votes
1answer
927 views

How to force the use of row locks?

I am trying to get my table to use row locks. I have already disabled lock escalation. The isolation level is READ_COMMITTED_SNAPSHOT alter table <TABLE_NAME> SET (LOCK_ESCALATION=DISABLE) go ...
2
votes
1answer
944 views

Why isn't the objectname and indexname populated in deadlock graph?

I got a request to check out some errors on a 2008 sp3 server (10.0.5500.0 - Enterprise Edition (64-bit)) and see if I could find deadlocks that were happening earlier. Traceflag 1222 wasn't enabled ...
4
votes
3answers
572 views

Is Oracle DB immune to the InnoDB deadlocks found in MySQL?

It seems odd to me that MySQL would not handle this internally: "Deadlock found when trying to get lock; try restarting transaction" Does Oracle DB work around this issue? After all, Oracle owns ...
1
vote
2answers
2k views

How to analyse innodb status on deadlock in insert Query?

I have a dead lock which i have posted here. I managed to get the innodb status from my server. Here is the Innodb status. OS WAIT ARRAY INFO: reservation count 247864, signal count 247470 Mutex ...
2
votes
2answers
1k views

Preventing mysql deadlocks in your php application that uses SELECT… LOCK IN SHARE MODE

If I understand SELECT ... LOCK IN SHARE MODE correctly, you can place it into a mysql transaction to select the rows you will be working with during that transaction. This is done in order to "lock ...
0
votes
1answer
632 views

SQL Server 2008, database completely locked

Our database becomes completely locked, and it seems that many tables not related to each other are locked at once. When this happens, it becomes locked for approximately 2 minutes, and when this ...
2
votes
1answer
305 views

Intent Exclusive (IX) Lock questions [closed]

I was experiencing a deadlock so I set up a trace flags as well as profile trace to capture a deadlock. During this exercise I found something interesting. In the profile trace I noticed that "sa" ...
3
votes
1answer
2k views

How to find out what caused the database(DB2) in a locking state

I know how to check the DB is in a lock state or not, but my question is how to find out which query caused the lock on table /db. IS there any log file getting created if something unexpected ...
8
votes
1answer
193 views

What does “*password------------” mean in a profile deadlock report?

In SQL Server 2008 R2, I got several deadlock reports that have "*password------------" in the input buffer. It looks like an attack but in that case I don't know the reason or the kind of attack. ...
3
votes
2answers
6k views

How to debug deadlocks in SQL Server 2008 R2?

I'm using SQL Server 2008 R2 that automatically lock database items based on my queries. Sometimes this deadlocks - two threads with different queries never ends. Is there any way to debug how SQL ...
6
votes
4answers
8k views

How to monitor deadlocks

When do you start troubleshooting a SQL Server 2005/2008 deadlocks and how? The alert is turned on SSMS via SQL Server performance condition alert, objects->SQLServer:Locks, Counter->Lock Waits/Sec, ...
0
votes
1answer
165 views

What would be possible reasons for a DeadLock to occur in Mysql Database?

If some one has a Table structure some thing like this, CREATE TABLE IF NOT EXISTS `domain_source` (`nid` int(11) NOT NULL DEFAULT '0', `domain_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`nid`) ) ...
2
votes
1answer
155 views

SSMS Object Explorer Details causes deadlock while job is running

I have a problem with one of my SQL Server jobs. I've found that while the job is running, SQL Server Management Studio locks up. It always locks up while I'm looking at tables and sprocs within the ...
2
votes
1answer
217 views

Why my application is blocked infinitely and SQL Server never timeout and kill the deadlock

I have a multi-thread application that can opened more than one database connection to perform database operation. These connections are using the same credential. Here is a problem, the application ...