Print this page

Apex Jobs using Flex Queue are in Holding state

Knowledge Article Number 000213851
Description When Flex Queues are used to submit batch jobs simultaneously, you will see that the Jobs that are in the Flex Queue will be in Holding Status. 
This would give an impression that they are stuck because they are assuming the Holding status but they are not. It is how the Flex Queue works. 
Resolution Normally, a Batch Job which has not started yet will assume the status of Queued. The batch which is currently being processed will be in the InProgress status.  Batch jobs usually have the limit of five queued or active jobs simultaneously. With Flex Queues, any jobs that are submitted for execution but are not processed immediately by the system go in holding status and are placed in a separate queue (the Apex flex queue).

Up to 100 batch jobs can be in the holding status. When system resources become available, the system picks up jobs from the Apex flex queue and moves them to the batch job queue. The status of these moved jobs changes from Holding to Queued. Queued jobs get executed when the system is ready to process new jobs and they will then go to InProgress status.

This would give you an impression that a lot of jobs are in holding status and are stuck.
They actually are placed in the Apex flex queue and are waiting to be picked up when system resources are available. 

Please Note : Since Batch is an Asynchronous process , there is no ETA for the time taken by an Job to move from Queued state to processing state , it total depends on the system resources availability during that moment .

The following links should give you more insight into this:


promote demote