zabbix 数据库问题

 Too many connections
 15155:20190823:052844.247 Cannot connect to the database. Exiting...
 15220:20190823:052844.249 server #260 started [trapper #146]
 15158:20190823:052844.249 Cannot connect to the database. Exiting...
 15225:20190823:052844.251 server #264 started [trapper #150]
 15224:20190823:052844.251 server #263 started [trapper #149]
 15227:20190823:052844.254 server #266 started [trapper #152]
 15206:20190823:052844.254 server #249 started [trapper #135]
 15225:20190823:052844.256 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15225:20190823:052844.256 Cannot connect to the database. Exiting...
 15170:20190823:052844.257 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15170:20190823:052844.257 Cannot connect to the database. Exiting...
 15227:20190823:052844.258 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15227:20190823:052844.258 Cannot connect to the database. Exiting...
 15214:20190823:052844.258 server #255 started [trapper #141]
 15218:20190823:052844.259 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15218:20190823:052844.259 Cannot connect to the database. Exiting...
 15207:20190823:052844.261 server #250 started [trapper #136]
 15224:20190823:052844.261 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15224:20190823:052844.261 Cannot connect to the database. Exiting...
 15206:20190823:052844.262 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15206:20190823:052844.262 Cannot connect to the database. Exiting...
 15220:20190823:052844.263 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15220:20190823:052844.263 Cannot connect to the database. Exiting...
 15212:20190823:052844.263 server #253 started [trapper #139]
 15207:20190823:052844.265 [Z3001] connection to database 'zabbix' failed: [1040] Too many connections
 15207:20190823:052844.265 Cannot connect to the database. Exiting...
 14744:20190823:052844.266 One child process died (PID:14984,exitcode/signal:1). Exiting ...
 15244:20190823:052844.312 server #267 started [trapper #153]
 14744:20190823:052844.316 syncing trend data...
 14744:20190823:052844.316 syncing trend data done
 14744:20190823:052844.316 Zabbix Server stopped. Zabbix 4.2.5 (revision 2c0e4d1d39).

处理方法:修改mariadb最大连接数

配置/etc/my.cnf
[mysqld]下新添加一行如下参数:
max_connections=300

vi /usr/lib/systemd/system/mariadb.service
取消[Service]前的#号,
[Service]新添加两行如下参数:
LimitNOFILE=10000
LimitNPROC=10000

systemctl --system daemon-reload
systemctl restart mariadb.service

 

posted @ 2019-08-23 17:41  菜鸟web  阅读(1182)  评论(0编辑  收藏  举报