Hi everybody,
the last two weeks many locking errors are occuring randomly, and the event viewer is showing the following: Error = The operation could not complete because a record was locked by another user. Please retry the activity.
Mainly it occurs when inserts are made in Change Log Entry Table, ie this morning the following happened:
EventTime: ‎2022‎-‎12‎-‎02T08:09:35.328113700Z
Message <ii>Exception happened during threshold Trace Tag. Execution Time = 10002 milliseconds
Error = The operation could not complete because a record was locked by another user. Please retry the activity.
Tag = 000007L
Message = Long running SQL statement
Task ID: 3
Statement: INSERT INTO "NAV2017".dbo."LIVE$Change Log Entry" ....
AppObjectType: CodeUnit
AppObjectId: 423
AL CallStack: "Change Log Management"(CodeUnit 423).InsertLogEntry line 49
"Change Log Management"(CodeUnit 423).LogModification line 20
ApplicationManagement(CodeUnit 1).OnDatabaseModify line 1
</ii>
ProcessId: 3184
As is referred in other similar community posts for this error, every NAV SQL statement with execution time over 10000 milliseconds may bring a lock in the record. Since the code hasn't been changed and a maintenance plan for rebuilding indexes runs every night, is there anything else we can do with the data(ie delete / archive change log records) or some NAV instance configuration change to happen in order the sql statements to do not take so long?
Any help will be much appreciated
Kind regards