function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Whitney YorstonWhitney Yorston 

Async Apex Executions

I am having an issue with async apex executions hitting their limits very quickly. Hoping to find a way to watch that and see what's causing the issues.
VinayVinay (Salesforce Developers) 
Hi Whitney,

'AsyncApexExecutions Limit Exception' means you are hitting an org wide 24 hour rolling limit on asynchronous Apex.

Check below reference for more details.
https://help.salesforce.com/articleView?id=000315026&type=1&mode=1

Also, Asynchronous Apex can be increased only under emergency situations as a temporary request would be granted for at most 2 weeks.
(https://help.salesforce.com/articleView?id=000329529&type=1&mode=1)

(Governor limits)
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Whitney YorstonWhitney Yorston
I appreciate the information, but this doesn't help me find a way to see what's causing the issue and further monitor it.
VinayVinay (Salesforce Developers) 
Hi Whitney,

If you are using batch class you might need to refactor your code so that it doesn't hit governor limits.

Else you can log a case with salesforce support so that they can check issue and provide details.

Thanks,
Michael PaisnerMichael Paisner

There is a new feature in Summer '23 that may help diagnose and manage this type of error:


The feature in Summer '23 is called: Configure Stack Depth of Chained Queueable Jobs (Beta)
https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_queueable_enhancements.htm&release=244&type=5

This provides calls you can put in your Apex code to see what your queueable limit is and how close you are to the limit.

Calls are part of the new System.AsyncInfo class and includes the methods:

getCurrentQueueableStackDepth()
getMaximumQueueableStackDepth()
getMinimumQueueableDelayInMinutes()
hasMaxStackDepth()

Hope this helps,

Mike