[OBM classic] Deadlock during event archival

Hi,

Has one came across below error during event archival in OBM?

please suggest. Thanks

ERROR: The database system reported an error: could not execute query -- An error occurred during the current command (Done status 0). Transaction (Process ID 165) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

  • Suggested Answer

    0  

    Hello Shrikant,

    With concurrency, there is always the potential of lock conflicts and deadlocks.
    Event archival tries to delete event(s), while other parts of OBM may try to update the same event(s).

    There is not much you can do other than what the error already suggests: Rerun the transaction.

    I'm not sure if event archival does a retry or not. If it continues without erroring out, it probably does a retry, or it simply skips events that caused an error.

    If it terminates due to the deadlock, then just run the archival again.

    Best regards,
    Tobias

  • 0 in reply to   

    Hi TObias,

    Thanks for your response!

    We are facing this issue since past few weeks, and we have tried to run the query many times still same error.

    Found this KB but not sure if this resolves the issue, need to test

    Automatic event archiving doesn't work properly in OBM with MSSQL

  • 0   in reply to 

    Hello,

    Please try archiving smaller chunks of events.  For example, find out the oldest event on your system and archive these events (e.g. they are 10 days old).  Next, archive the next day (day 9), then the next (day 8) and so on.  I'd expect one archive will fail, but at least you'll have archived the older events and your database will be much happier.  I think trying to find the problem event is a little more difficult, which is why I'd rerun the archive as suggested above.