[Warning] Could not increase number of max_open_files to more than 1024(request:5035)

报错现象

[Warning] Could not increase number of max_open_files to more than 1024 (request: 5035)
[Warning] Changed limits: max_open_files: 1024 max_connections: 594 (was 4096) table_cache: 200 (was 2000)

注:出现警告信息:提示最大打开文件数不能超过1024,但依然能够启动mariaDB。

解决方法

vim /etc/systemd/system/mariadb.service

 14 # For example, if you want to increase mysql's open-files-limit to 10000,
 15 # you need to increase systemd's LimitNOFILE setting, so create a file named
 16 # "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
 17 #       [Service]
 18 #       LimitNOFILE=10000  
 '//根据前面的warning信息,数值只需要大于上面提示的5035即可,还可以改为infinity '

验证

注:修改完之后,重新加载配置

systemctl daemon-reload
systemctl   restart  mariadb
systemctl   status   mariadb
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值