Deadlock found when trying to get lock; try restarting transaction?

When I run any procedure on my percona xtradb cluster 8.0. someimes

I got the error.

Deadlock found when trying to get lock; try restarting transaction.

and did not allow to run the mysql procedure.

any idea.

Thanks in advance.

1 Like

Hi, have a look at https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_print_all_deadlocks option. This should give you some pointers in the error log to identify the conflicting transactions.

1 Like

Also check awesome tool that helped me: pt-deadlock-logger .
With it I was able to fast solve all deadlock problems :slight_smile: .

1 Like