Hi!
The issue is that every one in a while Zabbix server stops processing any items (not at constant time). When checking zabbix_server.log I can see lines:
31024:20201125:140556.193 slow query: 703.504010 sec, "insert into history_uint (itemid,clock,ns,value) values (64913,1606305249,237080617,1),... very long query ....
31025:20201125:140556.331 slow query: 704.191528 sec, "insert into history_uint (itemid,clock,ns,value) values (134288,1606305249,358225838,1),... very long query ....
At this point CPU Load is around 80%, Available memory 2.7G out of 4GB.
after around 5-20 minutes it finishes it's hard work and things get back to normal.
I am unable to determine the cause for this issue, that started appearing recently after upgrading from Zabbix 4.4 to 5.2. Maybe problem is caused due to additional hosts added lately.
Database is MariaDB-10.5.8 running on the same host as Zabbix server. Zabbix server itself monitors only few web scenarios and ping hosts. Mosly receives all data from 7 proxies.
Related zabbix_server.conf values:
# HistoryCacheSize=16M
# HistoryIndexCacheSize=4M
ValueCacheSize=500M
Number of hosts (enabled 288)
Number of items (enabled 19537/disabled 757/not supported 285)
Number of triggers (enabled 7145)
Required server performance, new values per second 256.52
Please see screenshots attached for detailed information.
As can been seen from the graphs, it looks like housekeeper starts up, goes to 100% busy and right after that Zabbix history write cache gradually fills up to 100% and causes the lock up.

I would be glad to get any advice on which direction to look in to. Maybe there are some database optimizations that should be done? Or perhaps server resources are not enough for this environment?
The issue is that every one in a while Zabbix server stops processing any items (not at constant time). When checking zabbix_server.log I can see lines:
31024:20201125:140556.193 slow query: 703.504010 sec, "insert into history_uint (itemid,clock,ns,value) values (64913,1606305249,237080617,1),... very long query ....
31025:20201125:140556.331 slow query: 704.191528 sec, "insert into history_uint (itemid,clock,ns,value) values (134288,1606305249,358225838,1),... very long query ....
At this point CPU Load is around 80%, Available memory 2.7G out of 4GB.
after around 5-20 minutes it finishes it's hard work and things get back to normal.
I am unable to determine the cause for this issue, that started appearing recently after upgrading from Zabbix 4.4 to 5.2. Maybe problem is caused due to additional hosts added lately.
Database is MariaDB-10.5.8 running on the same host as Zabbix server. Zabbix server itself monitors only few web scenarios and ping hosts. Mosly receives all data from 7 proxies.
Related zabbix_server.conf values:
# HistoryCacheSize=16M
# HistoryIndexCacheSize=4M
ValueCacheSize=500M
Number of hosts (enabled 288)
Number of items (enabled 19537/disabled 757/not supported 285)
Number of triggers (enabled 7145)
Required server performance, new values per second 256.52
Please see screenshots attached for detailed information.
As can been seen from the graphs, it looks like housekeeper starts up, goes to 100% busy and right after that Zabbix history write cache gradually fills up to 100% and causes the lock up.
I would be glad to get any advice on which direction to look in to. Maybe there are some database optimizations that should be done? Or perhaps server resources are not enough for this environment?

Comment