1.检查索引,有唯一性索引unique index
2.一段时间里插入insert大量数据
3.有next-key lock(record + gap lock),导致X锁获取冲突,死锁
4.timeout.
https://www.jianshu.com/p/bbdf5d3884d6
https://i6448038.github.io/2019/02/23/mysql-lock/
https://opensource.actionsky.com/20190331-mysql-insert/
https://www.aneasystone.com/archives/2018/04/solving-dead-locks-four.html