We’re rewarding the question askers & reputations are being recalculated! Read more.

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
23 views

Minimizing and Handling Deadlocks Strategies

I want to discuss deadlock minimizing strategies. From isolation level to retries to different insert strategies. Lets say we have table A: CREATE TABLE `A` ( `id` int(11) NOT NULL AUTO_INCREMENT, ...
-1
votes
1answer
20 views

MYSQL-Deadlock found when trying to get lock; try restarting transaction [on hold]

------------------------ LATEST DETECTED DEADLOCK ------------------------ 2019-11-12 14:20:00 0xfa4 *** (1) TRANSACTION: TRANSACTION 4519225, ACTIVE 0 sec starting index read mysql tables in use 3, ...
2
votes
1answer
27 views

How to get more physical details when executing an SQL query?

I want to get some physical features about a SQL query execution with PostgreSQL, like Read/write page accesses I/O operations Response time Sequential I/O throughput rate Deadlocks Pages scanned ...
1
vote
0answers
59 views

Deadlock's Log in Sql Server [closed]

The following deadlock's log just confuses me. What is the difference between the "mode" in [keylock] and the "mode" in owner-list? Why owner has a requestType=wait, typically it is only seen in ...
0
votes
0answers
19 views

Create deadlock scenario without foreign key [duplicate]

I need to test my C# code in a SQL Server deadlock scenario. Is there a way to create a deadlock "on demand"? I have tried this: Begin Transaction Select * from TABLEA with (tablockx, holdlock) ...
2
votes
2answers
84 views

After upgrade from MySQL 5.5 to 5.7 queries are more frequently encountering deadlock

Recently we migrated our production DB to Amazon RDS with version upgrade from 5.5 to 5.7 using AWS DMS service. After that, we are frequently getting deadlock issues for our insert...on duplicate key ...
0
votes
0answers
20 views

ALTER TABLE causing transaction aborted

There are two transactions. One transaction I used BEGIN RO for read-only transaction. While the other one I used BEGIN to allow me adding a new column to my table called dummy_table. This is what I'...
1
vote
0answers
43 views

Random deadlocks SQL Server 2012 using ODBC Driver 17 and simple “Select * FROM” Stored Procedures

I'm getting random deadlock errors in my application on sometimes the simplest of stored procedures. The application environment where I'm experiencing the error uses the GUNICORN server in ...
5
votes
1answer
103 views

Deadlock Graph - Surviving Statement inputbuf does not show the object that was locked

I have captured a deadlock on my system and the (anonymised) XML output is as follows: <deadlock> <victim-list> <victimProcess id="processf4d9233468" /> </victim-...
0
votes
0answers
52 views

Deadlock in SQL Server

I have been trying to resolve this deadlock for a while now with no success, its seems like the users are opening multiple tabs when executing this task. Below is the deadlock trace from red gate. Can ...
0
votes
0answers
31 views

How do I handle deadlocking on a Stored Procedure when running an SSIS package?

I am concurrently running (for example 25) the same SSIS package that retrieves data from a 3rd party platform. This data is then inserted into our Production database. In order to increase ...
1
vote
1answer
36 views

Deadlock between two non related tables

I am facing with a deadlock between two tables Table1 and Table2. The deadlock occurs when an sp (sp2) delete from table2 and other sp (sp1) try to update table1. In table2 the column by which it is ...
0
votes
1answer
66 views

Microsoft SQL Server MERGE deadlock issue

I am using Microsoft SQL Server version: Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) Apr 29 2016 23:23:58 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows ...
2
votes
2answers
92 views

SQL Server Full-text population deadlock

I've created a full-text index on a non-persisted computed column in a table (details here). However, every couple days, the population gets deadlocked and stopped. Specifically: DESCRIPTION: A ...
0
votes
1answer
35 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 ...
-5
votes
2answers
152 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
82 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
73 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
89 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
151 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
242 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
685 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
102 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
64 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
70 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
29 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
18 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
131 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 ...
-1
votes
1answer
132 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
58 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
43 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
78 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
72 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
115 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
761 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
200 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
49 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
249 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
238 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
136 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
2k 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
74 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
197 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
59 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
426 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 ...