0
点赞
收藏
分享

微信扫一扫

mysql错误Warning: a long semaphore wait

北溟有渔夫 2022-02-13 阅读 56


之前运行mysql的时候好好的,今天建索引的时候出现一系列的warning:


InnoDB: Warning: a long semaphore wait


接着出现错误:


Error: semaphore wait has lasted > 600 seconds

随后服务自动关闭,网上资料说是因为哈希自适应索引的问题,mysql的哈希自适应索引是默认开启的,这样建立索引后,读取和写入的效率能提高2倍以上,但是有可能会出现死锁的问题,网上建议关闭

innodb_adaptive_hash_index

具体过程:

mysql -u root -t;
set global innodb_adaptive_hash_index=off;
查看修改结果
SHOW GLOBAL VARIABLES LIKE 'innodb_ada%';

可以看到innodb_adaptive_hash_index已经关闭,完成。


参考资料:

​​https://bugs.mysql.com/bug.php?id=50641​​

​​http://stackoverflow.com/questions/24860111/warning-a-long-semaphore-wait​​


举报

相关推荐

0 条评论