MySQL報錯InnoDB: A long semaphore wait【轉】


mysql登錄后無法執行命令如show processlist

查看MySQL錯誤日志

參考以下方法,執行

 1、系統層面

[root@pisphkdcbsql01 ~]# cat /proc/sys/kernel/sem 
250    32000    32    128
[root@pisphkdcbsql01 ~]# echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
[root@pisphkdcbsql01 ~]# sysctl -p 

2、MySQL參數修改

set global innodb_adaptive_hash_index=off;

查看修改結果
SHOW GLOBAL VARIABLES LIKE 'innodb_ada%';

可以看到innodb_adaptive_hash_index已經關閉,完成。

在my.cnf中添加
innodb_adaptive_hash_index=off

隨后服務自動關閉,網上資料說是因為哈希自適應索引的問題,mysql的哈希自適應索引是默認開啟的,這樣建立索引后,讀取和寫入的效率能提高2倍以上,但是有可能會出現死鎖的問題,網上建議關閉

 

轉自

https://blog.csdn.net/wulantian/article/details/37560849

mysql錯誤Warning: a long semaphore wait - captain618的博客 - CSDN博客 https://blog.csdn.net/captain618/article/details/52453370

mysql adaptive hash index - 敖爾其楞的專欄 - CSDN博客 https://blog.csdn.net/aoerqileng/article/details/61615887

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM