Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9709

Retain DB sessions on live http(s) connections

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.8
    • Frontend (F)
    • None
    • RHEL 9.4, Zabbix Server 7.0.4, MySQL DB is an Azure-managed DBaaS in HA via private endpoints.

      Standard Windows domain controller with conditional forwarding for *.mysql.database.azure.com and *.private.mysql.database.azure.com

      Hello,

      Currently it seems that whenever the Web UI needs to load a new page (for example, going from "Data Collection > Hosts" to "Data Collection > Templates", the Zabbix Web UI re-queries the database. This is expected. However, Zabbix appears to be closing the DB connection on page loading, causing a new connection to be opened when you refresh the page.

      In instances where:

      1. Zabbix uses a SQL Hostname (esp. where TLS encryption is used)
      2. DNS caching isn't used or available

      This can cause significant delays in web page responsiveness, which can see delays in the seconds depending on the environment. With Azure DBaaS, they update DNS A-records when a DB in HA fails over, making caching difficult. In addition, DNS resolution for Azure services is done by Azure DNS servers, potentially requiring conditional DNS forwarders, increasing DNS resolution delays, and therefore "processing" delays in Apache connections. See the example screenshots, where the servers were DNS resolution was moved to /etc/hosts yielding vastly improved performance, vs DNS resolution being sent to a DC, then conditionally forwarded to public DNS servers.

      Possible Fix?

      If the httpd session is still alive, keep the DB connection open. This should prevent the DB from re-querying the IP address for a given hostname. Additional error handling likely required if the DB connection terminates unexpectedly. This should also reduce overhead associated to Apache instances.

      Other Considerations

      This likely impacts other front end interfaces such as nginx.

      Environment

      Zabbix Server: 7.0.0+ (RHEL9 w/ Apache)

      Zabbix Proxy: N/A

      Zabbix Agent: N/A

      Zabbix DB: MySQL DBaaS via Azure in High Availability.

       

            vmurzins Valdis Murzins
            MRedbourne_BR Michael Redbourne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: