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

0
votes
1answer
302 views

Debugging lock time out with show engine innodb status

I am keeping getting this lock wait time out. Below is my current settings. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to ...
12
votes
1answer
351 views

SQL Deadlock on the same exclusively locked clustered Key (with NHibernate) on delete / insert

I have been working on this deadlock issue for quite a few days now and no matter what I do, it persists in one way or another. First, the general premise: We have Visits with VisitItems in a one to ...
1
vote
0answers
57 views

NOLOCK vs Read Uncommitted

in our environment, reports are running on the subscriber and resulting in deadlocks with MS Replication SPs, which are doing inserts/updates. What's the best way to eliminate the deadlocks? We have ...
0
votes
1answer
1k views

Deadlock caused by INSERT trigger - thread looking for lock it already has?

Using MySQL 5.6.17. I have a table with an INSERT trigger that reads values from that table and 4 other tables, combines the results and writes that to a sixth table. Ever since I added this trigger, ...
0
votes
1answer
604 views

MySQL: Transaction and Deadlock

I have table "tbl_data", where have a lot of rows (3 - 5 million). I have JAVA (*.jar) module from which I INSERT/UPDATE data into this table. If I start *.jar file (for example, "run.jar") and after ...
1
vote
2answers
417 views

Notification email when deadlock is encountered in Oracle alert log

How to send a notification email when a deadlock is encountered in alert log on any node like the deadlocks encountered below? (an alert any time a deadlock is detected in alert log) Node 1: Mon Sep ...
2
votes
0answers
49 views

Select Query with S lock wins on Insert with IX lock in deadlock

Select Query with S lock wins on Insert with IX lock in deadlock in Sql Server 2008R2. Attaching the deadlock xml file.Please help! http://pastebin.com/nY9EXbS8 This is from the error log by ...
-1
votes
2answers
2k views

Deadlock from select statements

I am getting deadlock from 2 select statements. What is the reason for that? And how can I fix this issue? Deadlocked processes: 11278 Victim process: 5185 Lock type: Index/(Key) Both ...
0
votes
0answers
29 views

Postgresl database deadlock problem

My Postgresql had following deadlock problem. [2016-06-15 15:38:55.657 MMT] ERROR: deadlock detected [2016-06-15 15:38:55.657 MMT] DETAIL: Process 2488 waits for ShareLock on transaction 1050868701;...
1
vote
2answers
213 views

What happens when SELECT … FOR UPDATE returns multiple rows?

I'm working on some dead-lock troubleshooting, particularly involving a row-swap. Currently the statements look like this, all running under the same transaction: SELECT IDENTIFIER FROM tables WHERE ...
2
votes
1answer
218 views

Oracle Ref Partitioning: Deadlock due to child table row migration

My ordering application uses Oracle 11g Database. This DB has a primary table ORDERS and multiple child tables like ORDER_DETAILS, PLAN etc. ORDERS table is LIST partitioned on STATUS column and all ...
5
votes
1answer
387 views

Deadlock free MERGE-alike in MySQL?

I am trying to implement some parts of MERGE in the MySQL driver in Drupal. Of course, Drupal has something but in truth it only works because the most frequent MERGE issuer just eats exceptions. So, ...
3
votes
1answer
67 views

Diagnosing a block in a process that EXECs several layers of stored procedures

Disclaimer: I am a developer. Please be nice to me. I am not the developer that is responsible for what follows. I try to be one of the good ones. I have inherited a support ticket that involves a ...
0
votes
1answer
114 views

Missing statement information from 'LATEST DETECTED DEADLOCK' InnoDB status output

I'm learning how to interpret the LATEST DETECTED DEADLOCK section in the output of SHOW ENGINE INNODB STATUS, and had a question about the output. Some sample output of SHOW ENGINE INNODB STATUS ...
4
votes
1answer
59 views

Why would MySQL request a shared-lock after setting transaction level to READ UNCOMMITTED

Running a processing job in multiple parallel batches which basically reads big chunks of rows to update a few - it's OK here to use a lower transaction level since I know the relevant values won't be ...
0
votes
0answers
37 views

Deadlocking on two update statements

Server Info: Microsoft SQL Server 2005 - 9.00.5057.00 (X64) Standard Edition (Build 7601: Service Pack 1) I have a table called LAB it has about 38 million rows in it. The primary key is a single ...
6
votes
1answer
677 views

Simulate deadlock with more than 2 processes

How to Simulate deadlock with more than 2 processes in SQL Server test environment? Can someone help me with the code? Just to clarify my question again, I don't want deadlock simulation with only 2 ...
0
votes
0answers
34 views

Database tempdb deadlock

I have been getting a deadlock error for a long time : Could somebody please help me as to what kind of deadlock this is and how to resolve the same. Please ask for any additional details if needed....
0
votes
1answer
66 views

ORA-02049 Timeout: Distributed Transaction Waiting for Lock Solution needed

We are cleaning up the last year's transactions from our primary database. We use public database link to delete the records a day by day from another database. Each days records are around 30-40k, ...
4
votes
1answer
46 views

Postgres database deadlock issue

I am using Cloudera Manager to monitor and configure Hadoop. I choose PostgreSQL as metastore of HUE - a web portal to submit your SQL to Hadoop. When I submit a SQL, the HUE says the database is ...
0
votes
1answer
73 views

Locking in stored procedures [closed]

If a stored procedure has multiple statements, will the lock acquired for the first statement be released once its executed or will it hold on till entire stored procedure is complete? I am running a ...
25
votes
5answers
12k 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. ...
0
votes
1answer
39 views

ORA-24033 : No recipient for message has been detected

I am using Oracle E-business Suite R12.1, 11G database version. Error I encountered when trying to create or modify a user or responsibility: ORA-24033 : no recipient for message has been ...
0
votes
1answer
45 views

`ON CONFLICT DO UPDATE` causing deadlocks?

I have a project where I'm trying to use the PostgreSQL ON CONFLICT DO UPDATE clause, and I'm having huge numbers of deadlocking issues. My schema is as follows: webarchive=# \d web_pages ...
3
votes
0answers
56 views

MySQL queries waiting for other queries to finish

We have 30-40 different projects in Python and PHP that update, insert and select more than 1 million rows of data in MySQL DB every day. Currently we use InnoDB Engine for our tables. The problem: ...
2
votes
1answer
65 views

Update with CTE & OUTPUT blocks on concurrent calls

I was having deadlock issues, so I started using this CTE trick that I read somewhere. No more deadlocks. But now each client that I add slows down (blocks?) the sproc. E.g. a 1-2 second update with ...
2
votes
0answers
33 views

Index on a highly updated field causing excessive locks in SQL server

I'm in a bit of a conundrum about what the best course of action on this (bad?) index is. I have a table which i use as a notification holder that i watch for database changes with. CREATE TABLE [dbo]...
2
votes
1answer
59 views

Trace flag is running, but not message when deadlock happens

Trace flags are used to temporarily set specific server characteristics or to switch off a particular behavior More information on the trace flags are here DBCC TRACESTATUS this above, is the ...
2
votes
1answer
93 views

what are the costs of enabling extended events?

I have been dealing with deadlocks, specifically getting their information, as you can see on this post here. On this same post Shanky recommended "You must now rely on extended events trace to ...
2
votes
1answer
75 views

Why does Deadlock occur for this INSERT/UPDATE combination despite seemingly holding an X lock?

I am regularly seeing deadlocks in a production MySQL 5.5 database but cannot determine exactly what the cause is. For context, we're inserting new records into a database which are triggered by ...
2
votes
1answer
148 views

Extended Events XML querie to show relevant info about deadlocks - SQL Server 2014

While trying to get together information about deadlocks I came across this link which asks a question regarding a trace: Interpretation of a column in SQL Server profile trace The answer dealt with ...
2
votes
1answer
70 views

Hold exclusive lock on a whole DB

As I explained in Set a filegroup to readonly, I wanna set some tables readonly, to have better performance. These tables are only written by an ETL that runs daily, then they are only read. ...
2
votes
1answer
102 views

Multi-victim deadlock in SQL Server

I have been seeing a lot of deadlocks occurring on a system with deadlock graphs similar to this one: I have been advised that it is a multi-victim deadlock but I cannot re-create a deadlock graph ...
0
votes
1answer
68 views

Database Full Backup fails being deadlock victim

On one of my SQL Server 2008 R2 Databases, Full backup job fails about twice a month due to Deadlocks. Transaction Log backup is only other job which is scheduled to execute at the same time. Can you ...
1
vote
1answer
110 views

Excessive page locking

There is a query: SELECT entry_id FROM table_name WHERE (path_id = 7 AND value_string = N'00020003-0004-0005-0006-000700080009' ) The table in this query contains some millions of records. Both ...
3
votes
0answers
108 views

Read/Write Deadlock on Ms-Sql Server

We are facing deadlocks when store procedure is concurrently executed. We are using Microsoft SQL Server 2008 R2, concurrent execution is done with java executing multiple request of sp. I have ...
1
vote
2answers
69 views

Select query on an index column with gap locking

I am trying to understand in which cases will a select query make a gap locking on an indexed column select. What I read so far: Select queries use the repeatable read mode in InnoDB and will not ...
3
votes
1answer
54 views

Dead Locks between an insert ignore and and an update

Using MySQL InnoDB. As far as I know and read so many time dead locks only happens when one transaction is locking resource A and waiting for B and another transaction does the opposite. So with ...
0
votes
0answers
55 views

database Deadlock again

Once again I have a deadlock problem with the following log: [17/03/16 16:42:20.020 -0300] FATAL OPERACIONES: SQLException: CreateEquipo: ERROR: deadlock detected Detail: Process 2923 waits for ...
10
votes
4answers
11k 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, ...
3
votes
2answers
1k views

Can I get notification when event occur?

SQL Servers has Traces and XEvents. These are used to capture and analyze what is going on with our SQL Server Instances. Events are stored in the stack for later analysis. For example, If I decide ...
1
vote
1answer
84 views

Long running SELECT query fails as deadlock victim to a DELETE on SQL SERVER - Why, and how to avoid this?

Firstly 1 thread selecting a huge amount of data from a table. Then, before the SELECT query is not yet finished, another thread deletes data from that table. It causes SELECT query to failed with ...
0
votes
0answers
28 views

Resetting deadlock count statistics

It seems that just restarting the PostgreSQL service doesn't clear / reset the detected deadlock count. How can it be restarted to zero? select version(); PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu,...
2
votes
2answers
114 views

Where to look for possible deadlock causes?

We've been having several problems the past days in our production environment, and some of them seem to boil down to database issues. Just realized we are having deadlocks (68 actually), on database ...
4
votes
1answer
78 views

Prevent Deadlocks in Vendor Databases

We have a Windows Update (WSUS) database that is used by Windows Update (obviously). A couple of times a day we will receive deadlocks on this database caused by the WSUS application running 2 update ...
0
votes
1answer
162 views

Pessimistic locking worst case

We are using Java EE and are making an application where in the worst case, a lot of message queue messages will come form the same User. Therefore, we are looking on Pessimistic, SELECT FOR UPDATE ...
1
vote
1answer
262 views

Force index on a delete

UPDATE backup.records FORCE INDEX(IDX_records_deviceId) SET readyToBeDeleted = 1 WHERE deviceId = 226219 AND timestamp <= 1445255546 *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space ...
2
votes
1answer
47 views

How to use two actions and a function in an Extended Events Histogram for deadlocks?

I'd like to get a histogram through extended events that shows the count of deadlocks per databasename by date, but I'm hitting two walls: How get a histogram to include two actions How to get the ...
1
vote
1answer
82 views

How do Locks Work in MySQL or MariaDB

There is a case which makes me a bit confused. As far as I understand deadlocks should appear if there are two query statements (including subqueries) in request (each transaction). So the ordering of ...
0
votes
0answers
85 views

How can I avoid this deadlock in MariaDB?

I saw that I got a deadlock in a MariaDB cluster. I have 3 cluster database. What should I do to avoid that? 160211 16:29:02 *** (1) TRANSACTION: TRANSACTION 75AB6B17, ACTIVE 0 sec starting index ...