Sorry, we didn't find any relevant articles for you.

Send us your queries using the form below and we will get back to you with a solution.

We've tried the above, but are still getting and error "Error Log Report - submit batch failed (nn) times."

1. Check for ApexToken Batch Jobs

ApexToken jobs are internal jobs used by the Salesforce Platform to manage flex queues. See: https://help.salesforce.com/articleView?id=000338931&type=1&mode=1 for more information.

On occasions, these can become stuck and cause other jobs (including Payments2Us ones) to also remain on hold.

 

The below sections provide you with all the information you need. Should Salesforce support come back with further questions, or if you need more information, then you will also need to have Payments2Us Premium support.

This issue is a Salesforce platform one and should NOT require you to have Salesforce developer support. If Salesforce support insists on this, we suggest you contact your Account Manager to escalate, or point support to the following bulletin board articles where this was previously resolved.

Read through the information below in this article before contacting Salesforce support as it with locate the information you need and if this is actually the issue that is causing your problems.

 

2. Open the Developer Console and check for stuck ApexToken Jobs

2.1. Open the Developer Console

  • Top right click on the settings cog
  • Followed by Developer Console

2.2. Run query on ApexToken Jobs

  1. Click on the query tab.
  2. Paste “SELECT Id, JobType, ApexClass.Name,CreatedDate, Status FROM AsyncApexJob WHERE JobType = 'ApexToken'” into the query
  3. Then press Execute

You'll need a screenshot similar to the below when logging a Salesforce support request.

 

SELECT Id, JobType, ApexClass.Name,CreatedDate, Status FROM AsyncApexJob WHERE JobType = 'ApexToken'

2.3. Determine if you have an ApexToken issue

In the screenshot in step "Run query on ApexToken Jobs" above, for item (4), you can see that there are two jobs that are at a "Queued" status since 2016. If there is ONE or more jobs that have a queued date this is old (more than a day or so), then this indicates you have this particular issue. If that is the case, then continue with the next steps

3. Locate jobs being held up

This step will be required when submitting the case to Salesforce support. They are likely to asked you for an example of a job being held up.

From setup (Cog - top right hand corner). Search for "Apex Job" and click into the menu option.

3.2. Add a filter to show queued or running jobs

Click the Create New View link that is next to the View picklist filter options

  • Give the filter a name, e.g. "All Running Jobs"
  • Add a filter based on the Status equals Queued,Processing,Preparing,Holding
  • Press the SAVE As button

3.3. Locate Jobs that are held

If you see jobs that have a "Submitted Date/Time" that was quite a while ago. In particular if you see "batchProcessor" (Apex Class) and the Submitted Date/time was more than an hour ago, then that is an example of a job affected by the ApexToken held job issue. You will need info when contacting Salesforce support.

You'll need a screenshot similar to the below when logging a Salesforce support request.

 

4. Logging a support case with Salesforce

The ONLY way this issue can be fixed is through Salesforce support/developer support.

Log a case along the following lines.

Subject: "Apex Batch Jobs hanging caused by ApexToken jobs stuck in Hold status"

Description:

Dear support,

We have a platform issue whereby ApexJobs are being held up by stuck/held ApexToken Jobs.

We understand from bulletin boards that this is going to require this case to be escalated. This is as noted at:

We have observed the stuck Apex Jobs (Copy/attached screenshots from step "Run query on ApexToken Jobs")

This is causing our Apex Jobs to become stuck (copy/attach screenshots from step "Locate Jobs that are held")

The above is a known Apex Flex Queue issue and is NOT A DEVELOPER SUPPORT ISSUE. We understand the Developer Support Team from Salesforce may need to get involved in fixing the Salesforce platform issue though.

Updated at July 27th, 2024

Was this article helpful?