HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Determine Reason for Deadlock in MySQL

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
deadlockreasonmysqlfordetermine

Problem

We've been seeing some deadlocks occur but have not been able to reproduce. Is there any way to determine, after the fact, what queries were running, etc to figure out why deadlock occurred?

Solution

I found this link in dba.stackexchange.com about deadlocks. In stackoverflow.com, user @Omry addressed how to avoid deadlocks and why they happen March 11, 2010 at 9:48 AM. User @ewernli adresssed this as well.

This involves the queries that access the same set of tables in different order from one query to the next.

Context

StackExchange Database Administrators Q#1739, answer score: 2

Revisions (0)

No revisions yet.