大网数据广告活动
服务器运维问答

Decrease zabbix server connections to database

· 52CE 我爱测

Is it possible to define a database pool value in order to decrease the database connections sent from zabbix server? I saw a method when it was done through apache mod_fcgid, Shall it be done with mod mpm_prefork as well? By doi…

问题原文

原帖链接 · Zumo de Vidrio · CC BY-SA 3.0

Is it possible to define a database pool value in order to decrease the database connections sent from zabbix server?

I saw a method when it was done through apache mod_fcgid, Shall it be done with mod mpm_prefork as well?

By doing tests (with only 2 users connected through web gui), I found 60 outgoing connections to database server when my limit in database server was 100, 23 when my limit was 20 (of course it didn't work) and with limit 30 I have 29 outgoing connections, Why such difference?

It seems to me that somehow, zabbix is able to identify the maximum number of database connections to create outgoing connections, but honestly that's a little strange for me, Zabbix seems to abuse of resources when I increase the pool in database server.

The scenario is a shared PostgreSQL server, that's why increasing pools in database server side is not a good idea in my case.

Zabbix is installed in a CentOS 7 server.

已采纳解答

原帖链接 · Richlv · CC BY-SA 4.0

Most likely, you are seeing connections from the server. Many server processes will keep their own connection. Making the limits low will cause issues, do not do that - processes will have issues connecting, reconnect, the connections will be opened and closed more often.

Your options are:

  • Increase the DB connection limit until there are spare connection slots.
  • Decrease the number of spawned Zabbix server processes (like pollers) until there are spare connection slots.

In general, putting Zabbix DB on a shared resource is not a good idea - that makes your monitoring system unreliable when production load increases or there are any other issues.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。