Deadlock, where one or more users have simultaneously locked the whole table

hi friends,

I am creating sales order shipment process using batch job from Load creation to Packing slip and I am consistently getting below error. even I have increased the schedule time to 1 hour even getting same error.

Cannot delete a record in Sales parm line information for India (SalesParmLine_IN). Reference: 0, 0. Deadlock, where one or more users have simultaneously locked the whole table or part of it. Posting Update has been cancelled.

Pls help me in this regard. Thanks in advance

 

B K Sharma

Parents
  • If you get it consistently, it probably means that your own batch is causing the deadlock.

    You have to collect more information, because it seems that you don't even know yet what commands are causing the deadlock.

    If I was you, I would start with deadlock logging in SQL Server - it will tell you exactly which statements are blocking each other and what's the locked resource. Then you should be able to locate it in AX.

    Nevertheless you may also catch deadlock exceptions in AX, use AX debugger, tracing etc.

    We can plan how to avoid the problem only when we know who is doing the locking. Maybe we can avoid the lock completely. Maybe we can change the order, therefore it will wait instead of deadlocking. Maybe we can add an index so it doesn't lock the whole table. And so on.

Reply Children
Related
Recommended