Issue
Full Circle has a lot of jobs running on the Scheduled Jobs page, and other jobs are not finding a slot to run through Apex Job Scheduler.
Salesforce limits the number of Apex classes that can be scheduled to run concurrently to 100. Because Apex runs in a multi-tenant environment, the Apex runtime engine strictly enforces this limit so that runaway Apex code or processes don’t monopolize shared resources.
The message “No available Scheduled Apex slots" means that all 100 slots are being used, so a new scheduled apex job cannot be created. This can lead to delays in asynchronous processing of FCI application data.
Sometimes, when it takes longer for the application to get an Apex Scheduled Job slot, several instances of the FCI RM scheduler may appear in the Scheduled Jobs list. This happens because when it is deleted, the FCI RM Scheduler continues to appear in the scheduled jobs page, even though it does not count toward the limit of 100 scheduled jobs. This is a known behavior in Salesforce.
Solution
To verify whether the jobs are really deleted from the scheduled jobs queue, you can use the code snippet below in the Dev console:
Select CronJobDetail.Name, CronJobDetail.JobType, State from CronTrigger where CronJobDetail. JobType = '7' And State = 'DELETED' Order By CronJobDetail.Name
FCI has a scheduled Apex job that runs every 6 minutes. It uses 1 Scheduled Apex Slot. Admins monitoring the Scheduled jobs will frequently notice FCI's jobs running in the scheduled jobs page. The Full Circle scheduled job (FCR_AsyncScheduledEntry & FCR_AsyncScheduledMainV3) picks up background tasks that would otherwise go unprocessed. These tasks are processed via the FCR_AsyncBatcherV3. This class is executed every 6 minutes even if there are no other asynchronous operations to process. This means that FCI's scheduler may appear frequently in the scheduled jobs list.
The "No available Scheduled Apex slots" error can also be mitigated if you assign a dedicated Apex slot to run FCI Apex jobs. Another solution is to reduce the number of Apex jobs in the queue. Prioritize the jobs that need the slots so that the scheduler runs efficiently in your org.
Resources
Salesforce Scheduler Developer Guide: https://blog.bessereau.eu/assets/pdf..._dev_guide.pdf
Comments
0 comments
Please sign in to leave a comment.