Flex Queue is Full

On This Page

Description

If you encounter this error, you’ll see the following message: “System.AsyncException: You’ve exceeded the limit of 100 jobs in the flex queue for org”.

Kubaru uses batch Apex jobs to perform various processes. Salesforce only allows up to five batch jobs to run at a time. When this limit is hit, jobs that are submitted are held in the Apex Flex Queue until resources become available to process them. Jobs in the flex queue sit in a “Holding” status until they are released for processing. The flex queue can hold up to 100 jobs at a time. If you exceed this limit, you will see this error.

Resolution

The first question to investigate when you see this error is which jobs are consuming your processing bandwidth. This can be determined by navigating to Setup > Jobs > Apex Jobs. From there, click Create New View, give it a name such as “Running Batch Jobs”, then under Specify Filter Criteria create two filters: Job Type = “Batch Apex”, and Status = “Processing”. This will show your current active batch jobs.

Ultimately the issue behind these jobs will need to be identified and resolved at a code level by the developer who created them, whether the code was created by one of your own developers or is part of a third-party managed package. Please reach out to us at support@kubaru.io for assistance. 

Was this article helpful?

On This Page