Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Batch job stuck on executing tasks

Posted on by 20

Hello,

we have a problem with ax2009 and batch jobs that stuck mostly on workflow processing at begin then loop create, errors like below for sure

Cannot edit a record in Workflow Messages Table (WorkflowMessageTable). Workflow message id: {00000000-0000-0000-0000-000000000000}, {00000000-0000-0000-0000-000000000000}.
Deadlock, where one or more users have simultaneously locked the whole table or part of it.

4x AOS, 1x Load Balancer, 1x Batch Server, 2x

Kernel Version 5.0.1500.4570

  • Grygory.Ivanov Profile Picture
    Grygory.Ivanov 160 on at
    RE: Batch job stuck on executing tasks

    Hi Martin,

    What is the period between message processing runs? 1 minute, 5, an hour? I would first try stopping 3 out of 4 your wf jobs and see if main msg processing job is stuck again, to make sure that message processing is really causing the deadlock. Then, what also might help is cleaning old stopped workflows. Cleanup of the all workflow messages (previously processed, they can be achived into separate non-queried table) also helps if the time processing is an issue (if your batch job is trying to reprocess the message that is stuck processing) - as table size also becomes a problem at times.

    Last resort would be getting a SQL trace of what is going on when this happens and posting it here.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,989 Super User on at
    RE: Batch job stuck on executing tasks

    It is unlikely that adding a load balancer would solve a deadlock issue. The root cause needs to be identified which would require someone having a look into what is happening in your environment in detail.

  • MartinGG Profile Picture
    MartinGG 20 on at
    RE: Batch job stuck on executing tasks

    If i would add also load balancer as batch server that could help somehow? we have 2x AOS 1x Load Balancer 1x Batch job

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,989 Super User on at
    RE: Batch job stuck on executing tasks

    Hi Martin,

    AX 2009 is a very old application. It is not supported anymore. The last time I had worked with it is about 8 years ago. It can have several root causes. I would suggest looking for a technical consultant who can do some troubleshooting in your environment.

  • MartinGG Profile Picture
    MartinGG 20 on at
    RE: Batch job stuck on executing tasks

    No i have 4x workflow jobs at all like i wrote, each type/description 1x

    Now its just stuck everyday at last once on few different type of jobs, doesnt matter if its workflow or anything else

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,989 Super User on at
    RE: Batch job stuck on executing tasks

    Hi Martin,

    Do you have 4 times the Message processing or did you intend to mention that there are 4 different batch jobs having this issue? If so, what are the errors on the other batch jobs?

  • MartinGG Profile Picture
    MartinGG 20 on at
    RE: Batch job stuck on executing tasks

    Due date expirations, Resend Mail,  Email Checker, Message processing 4x

    But seems its something with batch jobs at all, they stuck randomly on few of them ... its happening everyday right now sometimes server reboot help for half day

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,989 Super User on at
    RE: Batch job stuck on executing tasks

    Hi MartinGG,

    How many batch processes have you configured for the workflow message processing? Do you have customizations in this area?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans