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
-1
votes
0answers
17 views

Why does PG consider “deadlock detected” an error? How do I make it not bother me with those? [duplicate]

I have now followed every advice in existence about avoiding deadlocks. It is 100% impossible. And, given that I have gone to great lengths to detect and handle such occurrences, as one is supposed to ...
0
votes
1answer
22 views

Can PostgreSQL UPDATEs in autocommit mode deadlock?

Is it possible for UPDATEs in PostgreSQL to deadlock when in autocommit mode? If so, how, and why? (Or, why not?)
0
votes
0answers
20 views

Rolling back transaction with trx_mysql_thread_id of 0 create deadlocks on update

I'm using MySQL 5.6.41 on AWS RDS. I have seen, recently, lot of transactions ending as deadlocks. Using SELECT * FROM information_schema.innodb_trx; I found that a transaction was always there. +-----...
1
vote
1answer
122 views

Should simultaneous bulk inserts cause deadlocks, with a PK being an identity column, in SQL Server?

When analyzing a deadlock graph, it looks like the victim is a bulk insert, and the blockers are the same bulk insert. Using a message bus, many subscribers can end up doing a bulk insert at roughly ...
0
votes
1answer
37 views

Is my theory on INSERT deadlocks correct?

I originally had this (as three separate PG queries, from my applications): INSERT INTO table1 (col1) VALUES ($1) ON CONFLICT DO NOTHING; INSERT INTO table2 (col1) VALUES ($1) ON CONFLICT DO NOTHING; ...
4
votes
3answers
124 views

(Deadlock) Select Query Causes Insert Query to be Blocking in Transaction

Database: MySQL I have a running app with concurrency transactions in it. I noticed that there are so many errors occur related to deadlock. The error says SQLSTATE[40001]: Serialization failure: 1213 ...
0
votes
1answer
14 views

SQL Sever Transactional Replication on DB with deadlocks and blocking issues

Is it feasible to try and start Transactional Replication on a SQL Server DB with deadlocks and blocking issues. Are there any other options for a close to hot backup?
1
vote
0answers
28 views

InnoDB trigger deadlocks itself?

I have a MySQL 5.7.22 database using the InnoDB engine. There's a table respondents that has 6 associated triggers - three of them make CRUD operations on a completed_respondents table, and the other ...
0
votes
1answer
30 views

Why do these queries deadlock and how to work this around in MariaDB?

The following 2 queries enounter DB deadlock in my program: DELETE FROM proxies WHERE NOT EXISTS ( SELECT 1 FROM proxy_xref_proxy_list AS pxpl WHERE pxpl.ProxyID=proxies.ID AND (pxpl....
8
votes
1answer
96 views

MySQL deadlock: upsert query acquiring gap lock twice?

I am trying to debug a deadlock scenario which has been puzzling me for quite some time now. I am wondering if someone can shed any light into how this can happen. Here is the deadlock output: ------...
0
votes
0answers
22 views

Blocking task report is showing false positive

Here is the code I am using to send email alerts. It seems to send more false +ves, can anyone guide me how to resolve this ? DECLARE @Waiting INT; DECLARE @Message NVARCHAR(MAX); SELECT @Waiting =...
0
votes
1answer
47 views

how see parameter value on xml_deadlock_report

i have some xml_deadlock_report i got from this step management > sessions > system_health > package().even_file but when i see xml_deadlock_report i got sql query but i can't see what parameter use ...
0
votes
0answers
32 views

SQL Deadlock History [duplicate]

What query can I run to display historical deadlocks? I can see the current days deadlocks by going into "Management - Extended Events - system_health - package0.event_file" and looking at the ...
0
votes
1answer
30 views

Updating column having index causing Deadlock

My update statement: Update XyzTable set state ='second' where pgmNumber = 'prog123' and state = 'first' Both state and pgmNumber columns has individual index. Deadlock is happening even if above ...
0
votes
1answer
30 views

SQL Server Deadlock OPENXML insert

I am running into a deadlock issue when I call a stored procedure in Sql Server 2014 Enterprise Edition. An XML string is passed into the stored procedure and can be called many times in quick ...
0
votes
1answer
192 views

Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim (Msg 1205) when update

I have some issue when i test 100 user fill in attendance with same time. i got error message like this Transaction (Process ID) was deadlocked on lock resources with another process and has ...
0
votes
2answers
53 views

What is the difference between lock_timeout and deadlock_timeout?

What is the play between lock_timeout and deadlock_timeout ? What is the reason for a lock_timeout to occur not leading to a deadlock timeout. I am not able to think of scenarios from database ...
2
votes
2answers
34 views

Force update statements to take page locks in the same order?

I have two update statements on the same table that take page locks in different orders. This leads to deadlocks. Process A owns an update lock on page 1, and requests an update lock on page 2. ...
0
votes
1answer
104 views

MySQL: how to prevent deadlock on concurrent inserts

Percona Server 5.6.39-83.1-log Table structure: CREATE TABLE `myTable` ( `column_1` VARCHAR(50) NOT NULL DEFAULT '', `column_2` VARCHAR(50) NOT NULL DEFAULT '', `column_3` VARCHAR(50) ...
0
votes
3answers
72 views

MySQL - get latest record when date and time are two fields

I have a DB in which date and time are two columns. I need to get the latest (by latest I mean the record with the highest time) row. This is used as a sub query to feed another query. DB id ...
3
votes
1answer
92 views

Why do updates to separate sets of rows deadlock?

Update: I have resolved my problem by switching to optimistic locking (SNAPSHOT isolation). The question of why that was necessary in the first place remains unanswered, but I had to move on and thus ...
0
votes
1answer
48 views

Unable to understand this mysql deadlock log

I am getting a good number of these deadlocks (low % of total requests, but still high in absolute errors). For all the deadlocks, the pattern is very similar; but I am unable to understand why there ...
0
votes
1answer
33 views

Deadlock debugging with node: log responsible queries

I have a system of many node scripts that read and/or write automatically on a Postgres database all the time. One of those scripts randomly gets a deadlock. I would like to debug this, but the ...
0
votes
0answers
58 views

SSIS ETL Deadlock (Single Job)

I have a single SSIS Package on the server running via SQL Agent Job. Every now an then we are getting deadlocks issue. I used Breant Ozar's sp_BlitzLock to find out the deadlocks history and got ...
0
votes
1answer
346 views

Understanding INSERT … ON DUPLICATE KEY UPDATE deadlock scenario

I'm trying to understand a scenario where an INSERT ... ON DUPLICATE KEY UPDATE statement is causing deadlocks under high concurrency. The two tables in question: hosts: "CREATE TABLE `...
1
vote
1answer
78 views

Is SELECT FOR … UPDATE *necessary* to DELETE or UPDATE multiple rows without deadlock?

Consider the following when the transaction isolation level is Read Committed (the default): UPDATE example SET foo = 'bar' WHERE ... and DELETE FROM example WHERE ... Neither DELETE nor UPDATE ...
0
votes
0answers
36 views

SQL Deadlock resolution

I am seeking help regarding a SQL deadlock I am trying to resolve. Please ignore the fact that the query -> 'Select * from ... Where In...' can be written in a much more straightforward way. I got as ...
2
votes
1answer
128 views

Deadlock troubleshooting in SQLServer

Edit: In case it is relevant, we are connecting to the database via JDBC in a java webapp. We use autocommit=off for all of these operations, and deadlocks mean the job thread is not committed. I am ...
0
votes
2answers
95 views

Avoiding deadlocks in PostgreSQL with multiple clients

I am developing software which launches multiple, concurrent clients to connect to a PostgreSQL (12) database. When each client starts, the first thing it does upon connecting to PostgreSQL is to run ...
1
vote
2answers
484 views

Why am I getting a deadlock for a single UPDATE query?

I have two processes which execute code like this in parallel: begin; update foos set unread=false where owner_id=123 and unread=true; commit; This results in deadlocks. My understanding of what ...
0
votes
1answer
54 views

How to get the SQL_ID that is blocking another SQL?

Well, I'm personalizing a useful script that I found and I need put in this script what is the sql_id of the SQL that is blocking another SQL. Here is my script, if you try this, You never will get ...
0
votes
1answer
30 views

MySQL - How can a deadlock b caused by the same transaction?

I am experiencing a deadlock scenario, and it's possible that I'm just not reading this correctly but here are the details, my interpretation is at the bottom. The players: Transaction 1: An ETL ...
5
votes
1answer
332 views

SQL Server Deadlock between two selects and one update on one table

Our application encounters a deadlock every now and again (about once a week). The main culprit seems to be a query with two selects. One of them is to fill a temp table for performance reasons, the ...
3
votes
2answers
294 views

SQL Deadlocks - Same Stored Procedure Called Concurrently

I am working with a relatively complex system, where static tables are updated from multiple data sources as they are needed, because dynamically loading the data takes 4-5 seconds and we prefer to ...
0
votes
1answer
38 views

Multiple lock owners in SQL Server 2014

I've encountered a deadlock on SQL Server 2014, and created a deadlock report using extended events. Below is an excerpt from the report. What does it mean for objectlock(objid="554979041") to have ...
0
votes
1answer
86 views

Multiple SPIDs in sp_who2, Deadlocks and Parallelism

There were reports of slowness on our web application - screens hanging, some unable to log in. It's an OLTP system with approx 50 concurrent users. Upon investigation I found a few things: Number ...
0
votes
1answer
67 views

Unusual deadlock occuring

I have spent a few days trying to debug a deadlock that occurs in production. This is one I didn't understand however. Below is pseudo code for the stored procedure. The stored procedure generates a ...
1
vote
3answers
74 views

Constant deadlocks on a high load table

I have a table files with about 73m rows, which totals to about 45GB. The rows being inserted in a day are about 100k. But the total rows which we run IODKU can reach tens of millions a day (since ...
0
votes
1answer
34 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, ...
2
votes
1answer
56 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 ...
0
votes
0answers
21 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
151 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
34 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
221 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
198 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
57 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
36 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
48 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
139 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
481 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 ...

1
2 3 4 5
11