Hello!
I'm experiencing a lot of long running queries on our zabbix postgresql, and they come from Grafana dashboards (it's the main assumption - actually the DB overload could be caused by Grafana Direct DB Connection bypassing the API and querying history tables directly. Reducing pm.max_children helps with RAM but does not stop the DB flood)
seconds_running | table_name | application_name | query_preview
-----------------+--------------+------------------+--------------------------------------------------------------
57249 | history_uint | | SELECT h.* FROM history_uint h WHERE h.itemid IN (XXXX)
57249 | history | | SELECT h.* FROM history h WHERE h.itemid IN (XXXX)
Tables affected are "history_uint" and "history" as you can see, and this is affecting our environment because Grafana dashboards never load information.
psql (PostgreSQL) 13.23
zabbix_server (Zabbix) 7.0.21
We have tried restarting, scaling the server ram, upgrading the pm.max_children from 50 to 180...
All of these still not affecting and queries will still take too much to run.
Any ideas how to troubleshoot this? this happens since last Azure maintenance (last weekend, they restarted the zabbix db)
Thanks in advance.
I'm experiencing a lot of long running queries on our zabbix postgresql, and they come from Grafana dashboards (it's the main assumption - actually the DB overload could be caused by Grafana Direct DB Connection bypassing the API and querying history tables directly. Reducing pm.max_children helps with RAM but does not stop the DB flood)
seconds_running | table_name | application_name | query_preview
-----------------+--------------+------------------+--------------------------------------------------------------
57249 | history_uint | | SELECT h.* FROM history_uint h WHERE h.itemid IN (XXXX)
57249 | history | | SELECT h.* FROM history h WHERE h.itemid IN (XXXX)
Tables affected are "history_uint" and "history" as you can see, and this is affecting our environment because Grafana dashboards never load information.
psql (PostgreSQL) 13.23
zabbix_server (Zabbix) 7.0.21
We have tried restarting, scaling the server ram, upgrading the pm.max_children from 50 to 180...
All of these still not affecting and queries will still take too much to run.
Any ideas how to troubleshoot this? this happens since last Azure maintenance (last weekend, they restarted the zabbix db)
Thanks in advance.
Comment