mysql错误Warning: a long semaphore wait

来源:互联网 发布:java if else嵌套 编辑:程序博客网 时间:2024/05/01 07:41

之前运行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 0