zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    常用地址
    三步搭建Spring Cloud 服务注册
    Java判断两个时间段是否有交集
    CentOS-7下安装docker
    linux 版菱形
    《少林问道》
    Linux下安装Nginx详细图解教程
    测试
    CentOS修改主机名和主机表
    虚拟机中CentOS配置静态网络
  • 原文地址:https://www.cnblogs.com/paul8339/p/9803973.html
Copyright © 2011-2022 走看看