It happens because of Zabbix does not sort rows before update/delete. For example:
SQL (0.000334): UPDATE services SET status='0' WHERE serviceid='330' CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> DBexecute() SQL (0.000292): UPDATE services SET status='0' WHERE serviceid='325' CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> update_services_rec() -> DBexecute() SQL (0.000444): UPDATE services SET status='0' WHERE serviceid='1355' CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> DBexecute() SQL (0.000305): UPDATE services SET status='0' WHERE serviceid='1301' CAPIObject->delete() -> CAPIObject->__call() -> czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CService->delete() -> update_services_status_all() -> update_services_rec() -> update_services_rec() -> DBexecute()
The behavior can cause to deadlocks and locks
- is duplicated by
-
ZBX-8586 Saving an IT service takes very long
- Closed