Zabbix Server进程崩溃,报错“Too many open files”
问题现象
Zabbix Server服务启动后正常运行一段时间发生进程崩溃,重启服务后问题依旧,,Zabbix Server日志提示“zabbix_server [1555]: failed to open log file: [24] Too many open files”,具体内容如下
zabbix_server [1555]: failed to open log file: [24] Too many open files
zabbix_server [1555]: failed to write [cannot accept incoming IPC connection: [24] Too many open files] into log file
1558:20240725:175535.400 cannot read preprocessing service request
1556:20240725:175535.400 cannot read preprocessing service request
1557:20240725:175535.402 cannot read preprocessing service request
1429:20240725:175535.402 One child process died (PID:1555,exitcode/signal:1). Exiting ...
1429:20240725:175535.706 PROCESS EXIT: 1555
1547:20240725:175535.708 HA manager has been paused
3035:20240725:175535.847 cannot write to IPC socket: Broken pipe
3035:20240725:175535.847 cannot retrieve alert results
zabbix_server [1429]: Error waiting for process with PID 1555: [10] No child processes
1547:20240725:175535.925 HA manager has been stopped
1429:20240725:175535.933 syncing history data...
1429:20240725:175535.938 syncing history data... 100.000000%
1429:20240725:175535.938 syncing history data done
1429:20240725:175535.938 syncing trend data...
1429:20240725:175536.488 syncing trend data done
1429:20240725:175536.495 Zabbix Server stopped. Zabbix 6.0.29 (revision e8261478baa).
解决方法
修改服务配置文件/etc/systemd/system/zabbix-server.service
,增加
[Service]
LimitNOFILE=32000
LimitNPROC=32000
然后重新加载配置,重启服务
systemctl daemon-reload
systemctl restart zabbix-server