web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX Batch jobs get stuck (AX2012 R1 CU5)

(0) ShareShare
ReportReport
Posted on by 1,435

Hello everone,

I have a strange problem for a longer time which I can not see to solve (AX2012 R1 CU5)

Some batch jobs get stuck, which I have to cancel manually before other batch jobs are processed.

It concerns:

- "Create a scheduled task that will execute the batch transfer of subledger journal entries."

- "Named user license count reports processing"

Both last succesful 18-03-2014 23:00

When I manually cancel them batch processing continues.

- Automatic role assignment works fine

- Some other batch processes work fine

The conclusion is that our AOS (batch) server works fine.

I have a 3 tier setup. I tried to debug but it looks like the batch job is never really started. The batch jobs do not fail, it just hangs for days saying "executing", and debugger does not jump in.

Our system also does not generate SEPA files anymore (also generated by batch process).

What would be the right approach? Anyone can put me in the right direction ?

Any help is appreciated.

Kind regards, Willem.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,025 Super User 2025 Season 2 on at

    Hi Willem,

    When something is stuck in the workflow you could monitor the SQL database for deadlocks. I have seen stuck batches due to deadlocks before.

  • Wvduren Profile Picture
    1,435 on at

    Hi André, would that make sense if it only affects two batch jobs ? I just checked the log files of the SQL but couldn't find anything strange. I will google tonight to see how I can monitor for deadlocks.

    Thank you for your help.

  • Wvduren Profile Picture
    1,435 on at

    Hello Rudra! Thanks again for your help.

    I tried the SQL trace in AX, but no deadlocks found. Also in SQL logs no deadlocks. The SQL trace in AX show all kinds of SQL statements made, like: 

    100x:

    "SELECT TOP 1 T1.NAME,T1.TYPE,T1.USECOUNT,T1.MODIFIEDDATETIME,T1.CREATEDDATETIME,T1.RECVERSION,T1.RECID FROM SYSUTILELEMENTSLOG T1 WHERE ((TYPE=?) AND (NAME=?))"


    "SELECT OWNERGROUP, OWNERCHILDNAME, RELATIONNAME, EFFECTIVEACCESS, SYSMANAGED, MANAGEDBY, OBJECTGROUP, OBJECTNAME, OBJECTCHILDNAME, KERNELTYPE FROM [dbo].[ModelSecurityPermission] WHERE OWNERHANDLE = ? AND OWNERLAYER = ? AND OWNERGROUP = ? AND OWNERCHILDNAME = ? ORDER BY RECID"

    "SELECT TOP 1 T1.RECID FROM SYSFILESTORE T1 WHERE (BATCHJOB=?)"

    "SELECT TOP 1 T1.BATCHJOBCANCELED,T1.BATCHJOBENDED,T1.BATCHJOBERROR,T1.BATCHJOBID,T1.USERID,101090 FROM BATCHJOBALERTS T1 WHERE ((BATCHJOBID=?) AND (CREATEDBY=?))"

    Etc.

    Batch process still freezes.

     

    Seems to be a tough one...

  • Wvduren Profile Picture
    1,435 on at

    Hi Rudra,

    My current buffer size is 25. What do you recommend? Can I just do that in the production environment to test and afterwards change it back? Or will the changing back lead to problems ?

    I am not sure how to split the batch into two. They are system classes.

    Kind regards, WIllem.

  • Wvduren Profile Picture
    1,435 on at

    OK! Helps a lot.

    I just set it to 40. The batch job is executing for 40 minutes now, seems like it's hanging again. When a batch job is executed that normally hangs, the batch jobs that do not normally hang and are executed also hang ("executing"), Also when I cancel the first job that always hang. Strange behaviour...

  • Wvduren Profile Picture
    1,435 on at

    Hi Rudra,

    I just checked. The batch is still "busy" so it hangs, even with buffer size 40.

    I am thinking, is it an idea to manually run the class without batch to see if it runs then ? Using a Job for example ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans