How to debug Lock wait timeout exceeded on MySQL?

前端 未结 11 838
我寻月下人不归
我寻月下人不归 2020-11-22 11:46

In my production error logs I occasionally see:

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

11条回答
  •  心在旅途
    2020-11-22 12:23

    If you're using JDBC, then you have the option
    includeInnodbStatusInDeadlockExceptions=true

    https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html

提交回复
热议问题