0

I understand that the flex queue allows for a maximum of 100 batchable jobs at a time. Is there a similar limit for Queueable jobs? I’m aware of the global asynchronous limit of 250,000 jobs (or the users × 200 formula, with the option to purchase more), but is there a specific limit on the number of pending Queueable jobs?

The reason I ask as we have a LWC component that will could be making a high number of controller callouts to trigger a large number of Queueables in very short order while I know it may take some time to go through them all it's mostly wanting to know if theres a limit I need to be aware of.

5
  • 2
    I believe there is not, though there is apparently an org limit on the number of concurrently executing async processes, including Queueables and, as you said, that async execution daily limit.
    – Phil W
    Commented Nov 27 at 13:15
  • @PhilW so assuming you don't hit any transaction limit such as 50 in a enqueued in 1 transaction there's no Policy limit? The only limit is how long they will take to be processed due to concurrency limitations. Commented Nov 27 at 18:13
  • It is the combo of how fast you can enqueue them (as you said, max of 50 per sync transaction - including in Platform Event trigger based subscriber - and 1 per async transaction), how many can run concurrently (50) and how long they run for, and whether that exceeds the daily limits for asyncs.
    – Phil W
    Commented Nov 27 at 20:55
  • BTW, I have not confirmed the purported limit on concurrent async transactions. This is worth testing to check.
    – Phil W
    Commented Nov 27 at 21:29
  • @PhilW added bit more to the main but this could be 2000+ Queueable chains in a very short time period Commented Nov 28 at 13:24

2 Answers 2

1

Salesforce does not impose a specific limit on the number of pending Queueable jobs, similar to the 100-job limit for the Flex Queue.

You can enqueue up to 50 Queueable jobs in a single transaction.

When chaining Queueable jobs, you can only chain one job from another, meaning only one child job can be added from a parent job.

As you mentioned, there is a global limit of 250,000 asynchronous Apex method executions per 24-hour period, which includes Queueable, Batch, and future methods.

0

Adding to Tushar's explanation, the chained Queueable jobs approach is a great way to execute a lot of async work quickly as now the delay from one to the next is not noticeable for multiple jobs until the platform's throttling causes a pause.

Such code was hard to test in a scratch org because the length of the chain was limited to 5 but the ability to set the MaximumQueueableStackDepth avoids that problem. But be aware that MaximumQueueableStackDepth must be set only the first time you enqueue a queueable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .