Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-1657

update profileid queries DOSing the zabbix DB.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.8.2
    • 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.8, 1.8.1, 1.9.0 (alpha)
    • Frontend (F)
    • None
    • Zabbix 1.8
      MySQL 5.0.77 (also tested 5.0.88)
      Apache 2.2.3
      CentOS 5

      1150 hosts, 3 nodes, 2 proxies, 80k items.

      See also http://www.zabbix.com/forum/showthread.php?p=56849

      When viewing the dashboard, the web UI frequently becomes unresponsive. Checking the process list in the database reveals a large number of threads hung up on this query:

      UPDATE ids SET nextid=nextid+1 WHERE nodeid=1 AND table_name='profiles' AND field_name='profileid'

      Chasing the function calls in the code, I see this:

      1. get_dbid() in include/db.inc.php has the offending query on line 749.

      2. the only files calling get_dbid() for updating profileid are:

      insert_profile() from include/profiles.inc.php
      update_node_profile() from include/nodes.inc.php

      3. I doubt the dashboard is inserting profiles, so I'm guessing that update_node_profile() is probably causing the problem.

      4. update_node_profile() is only used in init_nodes() from include/nodes.inc.php

      5. init_nodes() is used by:

      include/page_header.php
      get_current_nodeid() from include/nodes.inc.php

      6. page_header and get_current_nodeid() are used pretty much everywhere.

      My gut feeling is that the AJAX on the dashboard is generating too many get_dbid() queries too fast, and the DB can't cope.

      This has made the webui basically unusable.

            Unassigned Unassigned
            wakko Brett Lentz
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: