- Newest
- Most votes
- Most comments
The sudden increase in deadlock occurrences after upgrading to MySQL 8.0.36
suggests that there might be some compatibility issues or changes in default settings that could be contributing to this problem.
What you can do:
- MySQL 8.0 introduced some changes in transaction isolation levels, and the default isolation level is now
REPEATABLE READ
.
💡 This isolation level can increase the chances of deadlocks, especially in applications with a high degree of concurrency.
Action: You can try changing the isolation level to READ COMMITTED
or READ UNCOMMITTED
(if your application can tolerate some anomalies) to see if it helps reduce the deadlock occurrences.
- Long-running queries can increase the likelihood of deadlocks by holding locks for an extended period.
Action: You can use the SHOW PROCESSLIST
statement or the performance_schema.events_statements_current
table to identify and optimize slow queries.
- MySQL 8.0 introduced some new settings and changes to existing settings that can impact concurrency and deadlock behavior.
Action: You can review the MySQL documentation and consider adjusting settings like innodb_lock_wait_timeout
, innodb_deadlock_detect
, and innodb_spin_wait_delay
to see if they help mitigate the deadlock issues.
Relevant content
- asked a year ago
- asked 2 years ago
- asked 7 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 4 months ago
Thanks for the insights. The isolation level is same in both 5.7 and 8.0. There are no slow queries. The deadlock is not getting captured in SHOW INNODB ENGINE STATUS; logs.