zoukankan      html  css  js  c++  java
  • too many files问题open_files_limit值更改无效(转)

    原文http://blog.itpub.net/30127122/viewspace-2140277/
    系统的值是正确的。然后修改/etc/my.cnf配置文件,添加
     
     
    open_files_limit=65535
     
     
    重启服务 之后 查看 show variables like '%open%'; 发现open_files_limit的值 还是1024 
      
    此时我们需要修改最后一个地方
     
     
    cat -n /etc/systemd/system/mysql.service
     
     
    在mysql.service中添加
    LimitNOFILE=65535   #新加入的内容 添加在最后一行
     
     
     
     
    重启服务服务,修改了mysql.server有可能需要systemctl daemon-reload 
     
    innobackupex 进行备份的时候 产生too many open files   
     
     
    发现我mysql下面文件数大于10W
     
     
    此时需要设置
      ulimit -n 1048576 重启后失效 所以还需要修改系统配置文件
    修改系统配置文件/etc/security/limits.conf  
    * soft nofile 1048576
    * hard nofile 1048576
     
     
    并且设置 my.cnf  open-files-limit=1048576  重启mysql服务
     
     
      
    问解决题
     
     
     
     
     
     
  • 相关阅读:
    Nginx 集群 反向代理多个服务器
    Nginx 反向代理
    Nginx 图片服务器
    网鼎杯 pwn 记录
    demo.testfire.net 靶场测试流程记录
    靶场测试系列(已办清单)
    Burp Suite插件推荐
    ida不错的插件记录
    0ctf2017-babyheap
    0ctf2018 pwn
  • 原文地址:https://www.cnblogs.com/xiaochongzi/p/8707234.html
Copyright © 2011-2022 走看看