Getting error "System.AsyncException: Rate Limiting Exception : AsyncApexExecutions Limit exceeded."
Problem
The error System.AsyncException: Rate Limiting Exception : AsyncApexExecutions Limit exceeded. means that you are hitting a wide 24-hour rolling limit on asynchronous Apex.
From Salesforce Documentation:
"The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period: 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater."
Solution
Check the limits in the Org.
Run this in the Dev console (the limit should be 250.000)
Map<String,System.OrgLimit> limitsMap = OrgLimits.getMap();
System.OrgLimit asyncLimit = limitsMap.get('DailyAsyncApexExecutions');
System.debug('Usage Value: ' + asyncLimit.getValue() + '/' + asyncLimit.getLimit());Mention the limit https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm
Further mentioning that the following screenshot is not the governor’s limit. These are the API request limits.
This depends on the number of records that you have at the moment. The calls from the trigger are queueable, meaning that by the time you hit the error message, you are passing the limit.
The following links explain this further:
https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T45u5SAB
https://salesforce.stackexchange.com/questions/337301/asynchronous-apex-and-queue
Unfortunately, there isn't much we can do on our end. If you are encountering any issues updating Salesforce records due to the error, we suggest disabling the Apex Trigger for the time being.