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)

Intermittent Server Error: 503 when running batch job

(0) ShareShare
ReportReport
Posted on by 380

Hi all,

We have a number of Batch jobs that are set to run at the same time, they include the same On-hand stock report but for different customers.
The issue is that these can run fine on one run but then on the next could all fail or partly fail with the Server Error 503.

I've checked through logs, event viewer on servers and can't see anything obvious. The reporting services log show the report requests were received and no errors so not sure where this has gone wrong.

Has anyone had this error in the batch jobs and can share the resolution for them?

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    Where did you get the error? In the infolog? Does it say anything in addition to "Server Error 503"? What do you mean by "partly fail"?

  • Dave W Profile Picture
    380 on at

    Hi Martin, yes it's from the infolog and it does give a stack trace also as below.  By partly fail i mean 3 of the jobs may complete but the rest fail with the error rather than all of them failing.

    The code at line 28 is where it checks if a Contract for the report exists or not.

    The request failed with HTTP status 503: Server Error.

    Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.

      at Dynamics.Ax.Application.SrsReportRunController.Runreport() in SrsReportRunController.runReport.xpp:line 28

      at Dynamics.Ax.Application.SrsReportRunController.Run() in SrsReportRunController.run.xpp:line 7

      at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54

      at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13

      at BatchRun::runJobStatic(Object[] )

      at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)

      at BatchIL.taskThreadEntry(Object threadArg)

  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    Can you show code at line 28 of SrsReportRunController.runReport()? It's an empty line in my AX.

  • Dave W Profile Picture
    380 on at

      

        // The contract should already be populated.
        if(!this.getReportContract())
        {
            throw error(strFmt("@SYS322717", this.parmReportName()));
        }
    
  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    It doesn't makes sense to me - the line clearly isn't throwing any exception (and if it was thrown inside getReportContract(), you would see it in the call stack). Are you sure that your CIL matches X++?

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