-
Problem report
-
Resolution: Fixed
-
Blocker
-
3.0.8
-
None
-
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);