zl程序教程

您现在的位置是:首页 >  系统

当前栏目

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

centos7服务 管理 open Files
2023-09-14 08:58:28 时间

修改/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