zabbix 5.2.6不定时重启, 日志报错 failed to open log file: [24] Too many open files

问题说明:zabbix server 不定时重启

问题表现

1、页面会提示 《 Zabbix server is not running: the information displayed may not be current .》,如下图所示

 

 

2、/var/log/message 会提示

systemd: zabbix_server.service: control process exited, code=exited status=1

systemd: Unit zabbix_server.service entered failed state.

systemd: zabbix_server.service failed.

systemd: zabbix_server.service holdoff time over, scheduling restart.

 

3、/var/log/zabbix_server.log 会提示

zabbix_server [27012]: failed to open log file: [24] Too many open files

zabbix_server [27012]: failed to write [cannot accept incoming IPC connection: [24] Too many open files] into log file

 

优化方式:

#查找defines.inc.php文件
find / -name defines.inc.php
#编辑defines.inc.php文件
vi /usr/share/
/include/defines.inc.php
#找到ZBX_MAX_GRAPHS_PER_PAGE
将20该大即可

修改
/etc/security/limits.conf
* soft nofile 655350 
* hard nofile 655350 
* soft nproc  655350 
* hard nproc  655350 

修改
/etc/systemd/system.conf 和 /etc/systemd/user.conf
DefaultLimitCORE=infinity
DefaultLimitNOFILE=100000
DefaultLimitNPROC=100000

修改
/etc/sysctl.conf
kernel.sem =500 64000 64  128
fs.file-max = 6553600

执行命令
sysctl -p 
systemctl daemon-reload
systemctl daemon-reexec

 

posted @   Hello_worlds  阅读(1112)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示