CentOS7 systemctrl管理的服务,open files的神坑

修改/etc/security/limits.conf:

* soft nofile 204800
* hard nofile 204800

bugbugbugbugbugbug:虽说是全局修改,但是用systemctrl启动的进程,最大值还是1024

在搭建keepalived遇到此问题

centos7还要修改 /etc/systemd/system.conf  以下两个值

DefaultLimitNOFILE=204800
DefaultLimitNPROC=204800

 

然后运行如下命令,才能生效。

1 sudo systemctl daemon-reexec
2 sudo systemctl restart nginx.service
posted @ 2020-09-14 21:07  ahuo  阅读(643)  评论(0编辑  收藏  举报