Many nights at 2am, when the housekeeper runs, we get a few deadlocks on SQL Server.
SQL query failed (Query = "INSERT INTO idata_2301 (item_id,idata_timestamp,idata_value,raw_value) VALUES (1061,1591683195,'Ok','3')"): [Microsoft][SQL Server Native Client 11.0][SQL Server]Transaction (Process ID 57) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
We also see some of the DELETE statements from the housekeeper failing for similar reasons: "SQL query failed (Query = "DELETE FROM idata_2637 WHERE (item_id=1817 AND idata_timestamp<1583907634) OR …" [Microsoft][SQL Server Native Client 11.0][SQL Server]Transaction (Process ID 63) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
This doesn't happen every night, and the number of deadlocks isn't the same every time, but it's often enough that it's waking people up at 2am.
Anyone have any thoughts on where to go to troubleshoot?
netxms 3.3-323
SQL Server 2016 SP2 CU12 (13.0.5698.0)
Thanks!
Peter