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.


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.

  • It's a pretty good advice, indeed, but it doesn't provide an option, considering the subject of the question. I believe that the user wanted to know how to decrease, and not necessarily why it should not decrease.. – ivanleoncz May 5 '20 at 19:00
  • 1
    That's a good point, added a couple of suggestions. – Richlv May 6 '20 at 8:36
  • Nice. Good one. Just to be sure: its is decrease or increase DB connection limit? – ivanleoncz May 6 '20 at 16:03
  • Increase - to accommodate the connections from server processes. The other option is to decrease the number of those processes. – Richlv May 6 '20 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.