linux上zabbix-server启动一会或者几秒钟就自动退出了


解决步骤:
  1:修改数据库配置文件
     max_connections=3000  #把最大连接数值改大

  如果是mariadb的话还需:
	 vi /usr/lib/systemd/system/mariadb.service

     [Service]新添加两行如下参数:
     LimitNOFILE=10000
     LimitNPROC=10000

     再重新加载系统服务,并重启mariadb服务
     systemctl --system daemon-reload
     systemctl restart mariadb.service
	 
  2:增大允许打开的文件数
     ulimit -n 2048
     vim /etc/security/limits.conf 

     #在最后加入  
     * soft nofile 4096  
     * hard nofile 4096
     
     或者只加入
     
      * - nofile 8192
	 

猜你喜欢

转载自blog.csdn.net/zzhlinux911218/article/details/85604828