Recently something happened on my 1.5.3 test system which cause the escalator to go nuts. Ever since then I've been running with 100% cpu utilization and at least 1.8 processor load.
I thave tracked down the bug to the escalator code which determines the sleep time.
src/zabbix_server/escalator/escalator.c:694-704
If get_minnextcheck returns 0 then the main escalator loop will never sleep and then go back to thrashing the MySQL database. Here is the change I made:
src/zabbix_server/escalator/escalator.c:700-701
There also seem to be some other errors in the code. When I changed the table which get_minnextcheck calls to be at least 1 second it would never change it's update interval in the debug log output.
My server load level is at a very nice and healthy 0.09 now.
Added as ZBX-405
I thave tracked down the bug to the escalator code which determines the sleep time.
src/zabbix_server/escalator/escalator.c:694-704
Code:
[B] nextcheck = get_minnextcheck();
if (FAIL == nextcheck)
sleeptime = CONFIG_ESCALATOR_FREQUENCY;
else {
sleeptime = nextcheck - time(NULL);
if (sleeptime < 0)
sleeptime = 0;
else if (sleeptime > CONFIG_ESCALATOR_FREQUENCY)
sleeptime = CONFIG_ESCALATOR_FREQUENCY;
}
[/B]
src/zabbix_server/escalator/escalator.c:700-701
Code:
if (sleeptime < 1) /* ensure we always sleep at least one second */ sleeptime = 1;
My server load level is at a very nice and healthy 0.09 now.

Added as ZBX-405
Comment