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

Slow new template importing

XMLWordPrintable

    • Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 14, Sprint 15
    • 3

      Importing new templates failed even after 30 min with "lock wait timeout" MySQL error. That takes minutes on 2.0, and become worst after upgrading on 3.0.
      One of a possible point is ids table and audit, noticed that during importing several times was blocked transactions with query DETETE from ids where table_name='auditlog', which must rise only when reached maximum ID.

      private static function refreshIds($table, $count) {
                      $tableSchema = self::getSchema($table);
                      $id_name = $tableSchema['key'];
      
                      // when we reach the maximum ID, we try to refresh them to check if any IDs have been freed
                      $sql = 'DELETE FROM ids WHERE table_name='.zbx_dbstr($table).' AND field_name='.zbx_dbstr($id_name);
      

        1. ZBX-11887.patch
          0.9 kB
        2. transaction locks more.png
          transaction locks more.png
          840 kB
        3. transaction locks.png
          transaction locks.png
          396 kB
        4. ids table.png
          ids table.png
          437 kB

            Miks.Kronkalns Miks Kronkalns
            neogan Andrei Gushchin (Inactive)
            Team B
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: