Questions tagged [deadlock]

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

deadlock detected during oracle expdp

I have an Oracle 11g and I wanted to export all my shcema objects, with this command: expdp as '/ as sysdba' directory=DIR dumpfile=DWH%U.dmp logfile=DWH.log filesize=40000m parallel=32 schemas=DWH ...
-1
votes
0answers
18 views

Oracle 12c- AWR deadlock finding

Its easy to find out locking from V$ views. I am investigating AWR with deadlock detection. Can anybody please provide the SQL query?
-5
votes
2answers
142 views

In the following inventory system, is it possible to force row locks to avoid deadlock and ensure it works as intended? [closed]

I want to atomically reserve inventory for N objects for M users. I have two inventory tracking tables, one for global inventory and one for personal inventory. Global Inventory Table Columns: ...
0
votes
1answer
60 views

Deadlock on partitioned table

we see deadlocks when loading a partitioned table. I wonder if someone can confirm what I think is the reason, or if I am looking at it wrong and we need to fix another thing. Our setup is like this: ...
1
vote
1answer
68 views

Can I prevent deadlock using `WITH(NOLOCK)`?

I have a table which I'm only Insert, Delete and Select (no Updates) on Insert, Sometimes it used a session lock (WITH (TABLOCKX)) I have a program using ADO which Select from the table using the ...
0
votes
2answers
75 views

Tools for SQL Deadlock Statistics [closed]

One of my company's SQL database generates a lot of deadlocks per day recently (someday >100) I'm trying to troubleshoot the causes of these deadlocks, i noticed that many deadlocks occur at the same ...
6
votes
1answer
118 views

Deadlock Priority High Chosen as deadlock victim

I have SQL Server 2016 SP2 (13.0.5237.0). Here is a deadlock graph I noticed recently in my system. The process with high deadlock priority was chosen as a victim (probably because of high log usage ...
9
votes
2answers
190 views

How to Prevent Partitioned Columnstore Deadlocks on SELECT

I have three Clustered Columnstore Index (CCI) tables in SQL Server 2016. All of these CCIs are in the same partitioning scheme, based on Tenant ID. Lately, and inconsistently, I am getting deadlocks ...
3
votes
1answer
540 views

How to prevent Deadlock on SELECT queries?

I have a multi-session DB. Few sessions inserting many rows to the DB. and one session selects from this table. Sometimes I'm getting a deadlock on the SELECT query and I don't understand why. For ...
0
votes
0answers
28 views

AWS RDS mysql deadlock

Everything in our production environment was working well. Yesterday, suddenly out of no where we were getting "lock wait" on any transaction related to a specific row. Same transaction on another row ...
0
votes
0answers
61 views

Reproduce Deadlock in SQL Server

I have identified a deadlock by using Solarwinds, I have noticed that it is happening in a specific table, that table only has a primary key, which tells me that the deadlock makes sense since every ...
0
votes
0answers
61 views

Deadlock / Isolation Level

I was analyzing a deadlock that I received when I noticed that one of the processes involved in the deadlock had the isolation level set to Read Uncommitted. I search the web... and searched in my ...
0
votes
0answers
26 views

MySQL - Investigate deadlock on atomic update

On a high traffic queue managed by Redis there is the following code: update `ads_publishers` set `impressions` = `impressions` + 1 where `ad_id` = ? and `pub_id` = ? Here's is the table schema: ...
0
votes
1answer
15 views

Posgresql - deadlock on non related queries

I am using Postgresql 11. I have found an error similar to following in my logs: org.postgresql.util.PSQLException: ERROR: deadlock detected Detail: Process 332091 waits for ShareLock on ...
5
votes
1answer
91 views

How can SQL Server 2016 deadlock with a pagelock on two different tables?

I'm using SQL Server 2016 and running into a situation where a deadlock, via pagelock, is happening on two different tables. As I understand the database never shares pages across tables, so how is it ...
0
votes
1answer
73 views

Deadlocks when concurrently inserting using multiple threads

I have a Laravel application that receives responses from a webhook. The data is transactional information from a payment gateway. At certain times of the day, I can receive hundreds of responses in ...
0
votes
0answers
25 views

Not in sync even after changing the Agent profile : Transaction Replication

Getting the transaction deadlock error,25098 and 547 in my replication monitor. I checked the subscribers and in one of subscribers ,i can see that ,the Distributor to Subscriber History shows error. ...
1
vote
1answer
51 views

Deadlock on the same resource calling the same procedure

I would like to kindly ask community for help with this deadlock scenario: <deadlock-list> <deadlock victim="process17392264e8"> <process-list> <process id="...
0
votes
1answer
41 views

Why can a select statement acquire more than 1 Sch-S lock on one table?

I have a repeating deadlock in my production environment. I cannot reproduce it in staging. Script 1 is a scheduled data import procedure. -- Create and populate new_TableImported if object_id('...
0
votes
2answers
66 views

MySQL 5.6.26 high concurrency dead lock

Table structure: CREATE TABLE `extend_0` ( `id` bigint(20) NOT NULL, `code` varchar(30) NOT NULL, `data_key` varchar(50) NOT NULL, `data_value` varchar(200) NOT NULL, `create_time` timestamp NOT ...
0
votes
0answers
62 views

Deadlock with a SP

Am a new DBA and just got stuck with the below stored procedure that is always involved in deadlock! The developer asked me to see if anything can be done to improve and how the deadlock occurrence ...
0
votes
0answers
58 views

One SPID has deadlocked itself - how? [duplicate]

We had some Deadlock alerts raised today - on further investigation I have found that it seems to all be the same SPID and related to parallelism events. How has this happened? I didn't think ...
0
votes
1answer
105 views

MySQL/innodb trying to lock uncommitted row from parallel transaction, deadlock in result

MySQL 8.0.16, 2 simple RC transactions, each trying to insert and delete rows: CREATE TABLE test1 ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(100), PRIMARY KEY (id) ) ...
2
votes
1answer
326 views

Mysql/innodb deadlock on simple delete query

Mysql/innodb 8.0.16, read committed transactions, several statements in transaction raise deadlock on deletion of non intercepting rows. Trying to understand what is happening: -----------------------...
12
votes
1answer
186 views

SQL Extended Events Session for deadlock detection

Is there a way to increase the size of the <inputbuf> element in the deadlock XML captured by the deadlock extended events session? We want to see the complete query to help pinpoint the issue ...
0
votes
0answers
46 views

Writer vs writer deadlock and solution

Earlier we used to have reader vs writer and writer vs reader deadlock, which is resolved by setting isolation level at application configuration level from "Repeatable Read" to "Read Committed" which ...
9
votes
1answer
225 views

Apparently, my CLR assembly function is causing deadlocks?

Our application needs to work equally well with an Oracle database or a Microsoft SQL Server database. To facilitate this, we created a handful of UDFs to homogenize our query syntax. For example, SQL ...
0
votes
0answers
26 views

Getting Database is locked error [duplicate]

I have a query in which I am updating a table and have used IN keyword in the query. The query is something like this: UPDATE q SET b_id = 123 WHERE id IN (SELECT id FROM q WHERE b_id IS NULL ...
2
votes
2answers
226 views

Deadlock on two update statements on the same page

I'm receiving multiple deadlocks in one SQL Server. The deadlocks occur when the same query with different parameter values is being issued on the same database: Example: Query 1: UPDATE Tabel1 ...
4
votes
1answer
70 views

How to avoid deadlock for this query?

I am running a MySql 5.7 database and I have a query which results in a deadlock as it is running in multiple threads. I am trying to figure out how to avoid this deadlock, but so far I haven't been ...
0
votes
0answers
92 views

MySQL InnoDB: how to interpret this InnoDB monitor output of Next-Key locks?

Next-Key Locks from MySQL documentation A next-key lock is a combination of a record lock on the index record and a gap lock on the gap before the index record. InnoDB performs row-level ...
4
votes
3answers
1k views

Deadlock Graph and Interpretation, solution to avoid

I am supporting vendor based application, which is filled with blocking and deadlock. Deadlocks occur mostly involving two or three processes however I noticed yesterday, it was involving 9 SPIDs. ...
0
votes
1answer
69 views

Are deadlocks always a symptom of design flaws or are they an unavoidable occurrence even in well designed systems with high data writes/reads? [closed]

A complete redesign proposal is experiencing deadlocks in its prototype. I am of the opinion that deadlocks are always the symptom of design flaws. I do not want to go into the specifics of our system;...
1
vote
2answers
176 views

Is this deadlock related to our database?

our application is running in a SQL enterprise cluster hosted at a client. We don't have administrative access. They are saying that our database is generating deadlocks, and sent us a huge trace file....
0
votes
0answers
53 views

Why two select statements are causing deadlock? S and IX locks

<deadlock> <victim-list> <victimProcess id="process516293848" /> </victim-list> <process-list> <process id="process516293848" taskpriority="0" logused="17436" ...
1
vote
2answers
293 views

Postgresql Deadlock - what does “while rechecking updated tuple” mean?

Question: Can someone please decipher while rechecking updated tuple for me in the following: 2019-02-20 10:34:26 UTC:1.2.3.4(17866):user@database:[31391]:ERROR: deadlock detected 2019-02-20 10:34:...
1
vote
1answer
52 views

Deadlock Explanation

I've inherited a SQL Server 2012 database that uses triggers to copy all changes made to dbo tables into an audit schema, providing functionality similar to system-versioned temporal tables. One of ...
1
vote
2answers
82 views

Overly eager explicit row locking causes deadlock

I'm running into deadlock problems on MariaDB using the INNODB engine. In my use case, I've got a number of threads working on a table. Each thread first reads a number of rows and then updates those....
1
vote
1answer
171 views

Sql server deadlock when insert and update in one transaction

I'm using Azure SQL + Java + Spring Boot 2. Currently I'm trying to understand the reason why deadlocks occur. In transaction I'm doing insert and later update on the same table by different rows. ...
2
votes
3answers
358 views

Transaction deadlock during restore

I am working on PS script to restore database backups and I have following SQL script that I am running from PS Invoke-SQLcmd command: USE master GO ALTER DATABASE mydatabase SET SINGLE_USER WITH ...
0
votes
1answer
52 views

Oracle 10g Database Locking Session Issue

I have a problem with locking and not timing out in one of my Oracle databases. This session locks occur on certain transactions that come from Oracle Forms users. For instance, when some user ...
1
vote
1answer
84 views

Issue with a “weird” deadlock in SQL server

I'm working with a database that has the characteristics that follow: GO /****** Object: Table [dbo].[ADS_EVENT_TYPE_STR] Script Date: 1/17/2019 8:20:36 PM ******/ SET ANSI_NULLS ON GO SET ...
3
votes
1answer
142 views

Does setting DEADLOCK_PRIORITY to LOW cause a stored procedure to run slower?

I have a Stored Procedure that I have written that deletes rows from a table in the database. When I will run the Stored Procedure in the Production environment it will run whilst another program is ...
0
votes
0answers
22 views

Deciphering InnoDB status logs

I noticed MySQL deadlock errors in my application logs and for investigation, I queried InnoDB status and got the below mentioned Latest detected deadlock *** (1) TRANSACTION: TRANSACTION ...
0
votes
3answers
96 views

Delete queries blocks other concurrent transactions

DELETE queries in my production SQL server are causing deadlocks. I know that DELETE is causing this because i checked the Extended Events and checked the deadlock XML and found out that this DELETE ...
0
votes
1answer
177 views

MySQL timeout on INSERT lasts almost 60 seconds

I have this table: CREATE TABLE `ClusterDescription` ( `ClusterDescriptionId` int(11) NOT NULL AUTO_INCREMENT, `ClusterId` int(11) NOT NULL, `RightBarDateTime` datetime NOT NULL, `...
0
votes
0answers
64 views

Read Deadlock XML - Intra-query Parallelism

I encountered several deadlocks in my application over the last 2 months and i checked the Extended Events to find the details. I tried to understand the dealock XML and i came across this great ...
4
votes
2answers
396 views

Serializable range deadlocks

Help required on an inherited deadlock problem! The code given below appears to have been written some time back, in an attempt to address contention issues around the assigning of new ID values on ...
2
votes
2answers
285 views

Query to return all Oracle Deadlocks in 12c

Is there an object I can query in 12c to return all ORA-60 Deadlock alerts? I just want to do a weekly report that outputs the number of deadlocks that have occurred and what schema they occurred on. ...
2
votes
1answer
511 views

Deadlock with insert and delete

Deadlock graph: <deadlock> <victim-list> <victimProcess id="process21881f1bc28" /> </victim-list> <process-list> <process id="process21881f1bc28" ...