Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Batch debugging practice

Posted on by 1,531

Hi Friends,

 

We have a few batch jobs, most of time, they run fine without problem.

But, once every other week, they stuck, if we kill and restart it, it will work fine again.

Obviously, it only happens in production, test server is just not up to the level for testing due to data volume.

What's better way to figure  out the problem, what's your past experience with it? We certainly don't want to put bunch of trace to it, since it will affect the performance.

 

Many thanks,

River

*This post is locked for comments

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Batch debugging practice

    Client can get on it. Basically, we have 3 AOS on 3 servers, batches split on 2 AOS.  

  • Malcolm Burtt Profile Picture
    Malcolm Burtt 1,475 on at
    RE: Batch debugging practice

    I was forgetting that AX 2009 has server side batch processing.

    Do you have an AOS that's a dedicated batch server or are you running the batch services on the same AOS as normal clients?

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Batch debugging practice

    Hi Malcolm,

    Key problem is this thing happens every other week or longer, in rare occasion, we need to kill the process on SQL due to block.

    We have a bunch of batches scheduled, are splited to run on two separated servers, I don't think AX client is running on those servers.

    Thanks,

  • Malcolm Burtt Profile Picture
    Malcolm Burtt 1,475 on at
    RE: Batch debugging practice

    So, no blocking and the SQL Server is processing a constantly changing list of commands for that process? If that's truly the case then the AX batch process is still running but slower than you would like.

    What's happening with the AX client process (ax32.exe) that's processing your batch job? Is it consuming CPU? How much memory has it consumed? What else is happening on the machine that the ax32.exe process is running on?

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Batch debugging practice

    Hi Malcolm,

    we looked at it, it didn't have useful information.

    Thanks,

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Batch debugging practice

    unfortunately, it's hard to test in TEST environment by simply copy over production data.

    Our data are dynamic.

  • Ganriver1 Profile Picture
    Ganriver1 1,531 on at
    RE: Batch debugging practice

    Hi Brian,

    For example, invoice processing batch, we already limited to certain number to process, but, once a while, it still hang. We suspect it's due to contention since there are a bunch of other batches running.

    When you use DynPerf, does is affect production performance?

    Thanks.

  • Malcolm Burtt Profile Picture
    Malcolm Burtt 1,475 on at
    RE: Batch debugging practice

    Have you looked at what's happening on the SQL Server at the point when your process stalls?

    Try and work out which SQL SPIDs are associated with your process and see if they are still making progress by checking the command that's currently executing (i.e. does this change from time to time?). The other thing to look for would be whether there is Blocking occurring on the SQL Server that's preventing your process from making progress.

  • Suggested answer
    syed baber Profile Picture
    syed baber 11,627 on at
    RE: Batch debugging practice

    Hi Ganriver,

    It usually happens that if a batch job which needs to process large set of data and you try to cancel the batch job, then it needs to rollback all the transactions which it did uptill that point, so it takes time to cancel batch jobs which are processing large set of data. If you need to test your batch job in TEST environment, you can first restore TEST with Production data and then the same set of data would be available to your batch job in TEST to process, so you can analyse it further.

    Please let me know if you have further queries.

    Thanks,

    Baber.

  • Suggested answer
    Brian Kinser Profile Picture
    Brian Kinser 815 on at
    RE: Batch debugging practice

    Couple of questions first.....What type of batch jobs are these? What exactly are they doing when the hang? such as large data imports or aging reports......the reason I ask is that there are some default settings in the server config that present data / buffer size limitations. IF you exhaust those limits the batch job will simply wait around until the resources become available. DynPerf I have used for performance monitoring but it can be used to track these type of situations as well, it will at least tell you what is happening when these hangs occur, then you can attack the right code.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans