Ad Widget

Collapse

Problem with escalator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #1

    Problem with escalator

    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
    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]
    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
    Code:
    if (sleeptime < 1)  /* ensure we always sleep at least one second */
      sleeptime = 1;
    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
    Last edited by nelsonab; 21-07-2008, 22:26. Reason: added ticket number
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • Sasha
      Zabbix developer
      • Sep 2007
      • 60

      #3
      Thank you!
      Problem is fixed in rev. 5860.
      ZABBIX Developer
      Riga, Latvia

      Comment

      • ataylo13
        Senior Member
        • Feb 2007
        • 122

        #4
        Excellent! I am downloading now.

        What was the issue? I have been running 1.5.3 since it was released and just yesterday zabbix blew up and started alerting on everything saying no data has been received, but all of the items values were updating.
        Version : 1.8.8
        Current Configuration 1 Master and 3 Child Nodes

        Comment

        Working...