[FAQ] Deadlock found when trying to get lock; try restarting transaction 死锁问题处理

[问题澄清]
版本:V3.0 V4.0
问题描述:发现报错 Deadlock found when trying to get lock; try restarting transaction

[原因分析]
业务上存在死锁

[解决方案]
在 TiDB.log 搜索 Deadlock found when trying to get lock; try restarting transaction,可以定为到产生死锁对应的 sql ,之后联系业务侧排查问题.

[参考案例]