分类
后端

Magento2 Lock wait timeout exceeded; try restarting transaction

bin/magento index:reindex出现如下报错
Inventory indexer process unknown error:
SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: DELETE FROM `inventory_stock_2` WHERE (sku IN  ... ...
原因 数据库被锁住了 解决办法kill掉长期运行的SQL进程
通过MySQL命令/或者工具 进入当前数据库的MySQL 
SHOW PROCESSLIST;

删除掉Time 过长的  比如大于100之类的