zoukankan      html  css  js  c++  java
  • 关于too many open files解决方案

    mysql> show variables like '%open_files_limit%';
    +------------------+-------+
    | Variable_name    | Value |
    +------------------+-------+
    | open_files_limit | 1024  |
    +------------------+-------+
    1 row in set (0.00 sec)
    查看mysql文件打开最大限制;

    查看mysql文件打开最大限制;
    修改vim /etc/security/limits.conf
    * soft  nofile 65535
    * hard  nofile 65535

    重新打开ssh窗口,登录,查看设置结果
    [root@localhost ~]# ulimit -n
    65535

    使mysql配置生效有如下两种方式

    1、登录mysql,查看连接数,没有变化,还是214,在mysql开机启动服务文件中添加如下配置(infinity是最大的意思)

    vim /usr/lib/systemd/system/mysqld.service

    LimitNOFILE=infinity
    LimitMEMLOCK=infinity

    重启mysql

    systemctl daemon-reload
    systemctl restart mysql

    转自:https://www.cnblogs.com/qq931399960/p/10749328.html

  • 相关阅读:
    TCP和UDP区别
    session和cookie的区别
    2019 腾讯正式批笔试题题解
    modCount干嘛的
    分布式系统唯一ID生成方案汇总
    分布式数据库名词
    快手第一题
    南柯一梦
    349. 两个数组的交集
    synchronized锁优化
  • 原文地址:https://www.cnblogs.com/turbozhang/p/14097784.html
Copyright © 2011-2022 走看看