I have a MySql DB that is encountering some deadlocks. I want the log all deadlocks, any thoughts of how to do this?
Asked
Active
Viewed 1,734 times
2 Answers
0
Enable the global variable :- innodb_print_all_deadlocks. When this variable is enabled, information about all deadlocks in InnoDB user transaction is recorded in mysqld error log. Otherwise, you see information about only the last deadlock, using the SHOW ENGINE INNODB STATUS command. I use a tool called Monyog, it is of great help in catching deadlocks, it has a dedicated InnoDb deadlock Monitor group for which you can enable mail alerts and it notifies you every time the variable reaches critical/warning state.

Veer Abheek Singh Manhas
- 113
- 4