D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

Master Scheduling Deadlock Errors

  • 1.  Master Scheduling Deadlock Errors

    Posted Feb 13, 2020 05:28 AM
    Occasionally, I am getting the following error message from running Master scheduling which is run as a batch job during the night;
    Cannot select a record in Net requirements (ReqTrans).
    Deadlock, where one or more users have simultaneously locked the whole table or part of it.


    I was getting this error when I originally made use of 8 helpers, but reducing this to 0 seemed to resolve the issue, however it has begun to reoccur. There doesn't appear to be an issue with the item setup as I can manually run master scheduling without error.

    Has anyone else encountered this issue and is there a workaround or a solution?

    I'm thinking that the code needs amending to include Try..catch..retry keywords.

    ------------------------------
    Paul Fildes
    Steelite International Ltd
    Stoke-On-Trent
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Master Scheduling Deadlock Errors

    MICROSOFT MVP
    Posted Feb 13, 2020 05:30 PM
    Hi Paul,

    Which exact version of AX 2012 are you using? Have you searched LCS for a potential known issue?

    ------------------------------
    kind regards,

    André Arnaud de Calavon
    Product manager, Microsoft MVP - Microsoft Dynamics Business Solutions
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Master Scheduling Deadlock Errors

    Posted Feb 26, 2020 06:10 AM
    Hi Andre
    We are using AX 2012 R3 (CU10, I believe). I did check LCS when we first encountered the issue, but scheduling the operation with zero helpers seemed to solve it, however it has returned. I will check again
    Thanks,
    Paul

    ------------------------------
    Paul Fildes
    Steelite International Ltd
    Stoke-On-Trent
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Master Scheduling Deadlock Errors

    Posted Feb 14, 2020 02:21 AM
    We have had similar issues, getting worse and worse over time, mainly when using helpers, but also occasionally without helpers. Below some of the actions we have taken, to solve the issue :

    Custom code

    Re-design custom code in class\ReqCalc Note: Part 1 (updating fields)

    Clean orphan data

    SQL job to clean up Orphan data

    PAGE lock (REQ)

    Disable PAGE lock for Main REQ tables

    New Index

    New Index creation on ReqTransTable

    Circularity checks

    Clean systematically circularity checks

    PAGE lock (Batch)

    Disable PAGE lock for Main Batch tables

    PAGE lock (ReqLog)

    Disable PAGE lock for ReqLog


    For us the sum of these actions solved the issues. Good luck

    ------------------------------
    Patricia Liekens
    Lantmännen Unibake Holding A/S
    Copenhagen
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role