-
Type:
Patch request
-
Resolution: Unsupported version
-
Priority:
Critical
-
None
-
Affects Version/s: None
-
Component/s: Server (S)
-
None
Hello Guys,
We had the same problem here but our problem was not related to any widget , zabbix database server was unresponsive due to high CPU usage. after some analyses i ve created the below index .
symptoms : CPU usage was %100 on database server (MySQL) , zabbix was unresponsive , whenever zabbix frontend is up and running.
cause : During the high cpu usage , top 10 time consuming queries was related to problem table. After some manual checks i thought ordering was the issue. Without ordering clause query execution was ok.
action: Created a composite index on problem table like
create index problem_4 on problem (r_eventid,eventid) USING BTREE;
After action : cpu usage is %20 and application runs fine.
problematic query example ;
SELECT * FROM problem p,triggers t WHERE p.source='0' AND p.object='0' AND p.objectid=t.triggerid AND t.priority IN ('4','5') AND NOT EXISTS (SELECT NULL FROM acknowledges a WHERE p.eventid=a.eventid) AND p.r_eventid IS NULL ORDER BY p.eventid DESC LIMIT 1001;