October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

Laravel Horizon Queue Balancing: Fix Idle Workers and Starved Queues

Laravel Horizon’s balancing mode determines whether workers follow workload, split evenly, or process queues in order. Learn how to choose and tune the right approach.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If one Laravel Horizon queue has idle workers while another is backed up, check the supervisor’s balancing strategy first. auto shifts processes according to workload, simple divides a fixed process total evenly, and balance => false follows the configured queue order. That last option creates ordered priority; auto does not.

Why can workers be idle while a queue is backed up?

Horizon allocates worker processes according to the supervisor’s balancing strategy, not simply according to which queue appears first in the configuration. With auto, a queue can have workers waiting while another receives more of the available processes because it has more work. Laravel’s documentation illustrates this with one queue holding 1,000 pending jobs and another empty; the example is illustrative, not a performance measurement.

As an Amazon Associate I earn from qualifying purchases.

If you expected the first queue in the list to take precedence, that expectation conflicts with auto behavior. Laravel states: “The order of queues in a supervisor’s configuration does not affect how worker processes are assigned.” See the Laravel Horizon documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How the three balancing strategies differ

Strategy Worker allocation Does queue order set priority? Best fit
auto Adjusts worker processes across queues in response to workload. No. Queue-list order does not determine allocation. Workloads that vary and need workers to move toward queues with pending work.
simple Splits a fixed total evenly among the configured queues. No priority rule is established by order; the allocation is even. Queues that should each retain a predictable share of a fixed process total.
false Processes queues in the listed order, like the default queue worker behavior. Yes. Earlier queues are handled before later ones. When ordered priority matters more than equal access.

Use auto for workload-responsive allocation

Choose auto when demand shifts between queues and you want Horizon to assign more processes where work is accumulating. It is not strict priority: putting high before low in the queue list does not guarantee that the first queue receives workers first.

Use simple for an even fixed split

simple distributes the supervisor’s fixed process count evenly. Laravel’s documentation gives an example of 10 processes across two queues, with five processes assigned to each. If queues need different fixed totals, use separate supervisors rather than expecting simple to make an uneven split.

Use false when listed order is the priority rule

With balance => false, queues are processed in the order listed. This makes priority explicit, but it can leave later queues waiting: Laravel notes that a continuously backlogged earlier queue can be fully processed before a later one is handled.

How to choose a strategy for a starved queue

  • Demand varies and queues should share capacity dynamically: use auto, then tune its limits and balancing cadence.
  • Every queue needs a stable, equal share: use simple with a fixed process total.
  • Some work must be handled ahead of other work: use balance => false and account for the possibility that later queues wait behind a backlog.
  • A queue needs capacity independent of others: place it under a separate supervisor with explicit process limits.

Separate supervisors are useful when queues have different service needs or when a resource-intensive workload must be isolated. Laravel also suggests considering a dedicated queue with a limited maxProcesses for heavy jobs, to prevent them from consuming excessive CPU and overloading the system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What to tune when using auto

Auto balancing is shaped by several settings together. They affect how much capacity is available, how it is distributed, and how rapidly allocation responds to changing queues.

  • minProcesses sets a minimum number of processes per queue.
  • maxProcesses caps the total processes across queues.
  • autoScalingStrategy selects allocation based on estimated time to clear, job count, or logarithm of job count. The logarithmic option is described as reducing the outsized allocation a much larger queue might otherwise receive.
  • balanceMaxShift limits the number of process changes in a balancing interval.
  • balanceCooldown sets the interval between balancing decisions.

Laravel’s documented example uses a maximum shift of one process every three seconds. Treat that as an example configuration, not a general recommendation. A larger minimum can preserve ready capacity, while a tighter process cap can constrain resource use; the right settings depend on queue wait times, job duration, throughput, and the deployment’s resource limits.

Check timeout and retry settings before scaling down

Laravel warns that during auto scale-down, Horizon can treat in-progress workers as hanging and force-kill them after the Horizon timeout. Configure timeout relationships for the actual job durations and retry behavior:

  • Set the Horizon timeout higher than job-level timeouts.
  • Keep the Horizon timeout a few seconds shorter than the queue connection’s retry_after.

If these relationships are wrong, jobs may be terminated mid-execution or processed twice. Do not increase or decrease timeout values without checking how long the jobs can run and when the queue connection makes them eligible for retry.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When managed warm workers are a better fit

If the underlying need is to keep a worker ready without managing worker processes directly, Laravel’s announcement for managed queues on Laravel Cloud describes setting a minimum number of workers on a queue to avoid a cold start. This is a deployment option, not another Horizon balancing strategy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.