Open hasyrails opened 3 years ago
RSpecを実行すると、 Lock wait timeout exceeded; try restarting transaction mysqlというエラーがでる - Qiita
mysql -u root -p
SHOW ENGINE INNODB STATUS
------------
TRANSACTIONS
------------
Trx id counter 40740
Purge done for trx's n:o < 40726 undo n:o < 0 state: running but idle
History list length 4
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 422048648150344, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422048648149504, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422048648148664, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 40733, ACTIVE 541 sec
4 lock struct(s), heap size 1136, 3 row lock(s), undo log entries 1
MySQL thread id 344, OS thread handle 123145383948288, query id 22345 localhost root
Trx read view will not see trx with id >= 40733, sees < 40724
---TRANSACTION 40724, ACTIVE 581 sec
4 lock struct(s), heap size 1136, 5 row lock(s), undo log entries 6
MySQL thread id 343, OS thread handle 123145384251392, query id 22287 localhost root
Trx read view will not see trx with id >= 40724, sees < 40724
kill 343
---TRANSACTION 40724, ACTIVE 581 sec
4 lock struct(s), heap size 1136, 5 row lock(s), undo log entries 6
MySQL thread id XXX, ←このXXXの部分をkillする
状況
bundle exec rspecができない