Laravel Horizon: The Defaults I Change Before Production
By Aakash Verma · · 4 min read
Laravel Horizon is a dashboard and a config file for Laravel queues that run on Redis. That's it. It doesn't replace the queue, it supervises the workers, decides how many run on which queue, and shows you what they did. If your queue driver is database or SQS, Horizon isn't for you. It needs redis, and the Laravel 13 docs still say it doesn't work with Redis Cluster.
Versions as I write this, on November 16, 2026: laravel/horizon 5.51.0 (released November 2) and Laravel 13.42.
Installing it takes two commands, composer require laravel/horizon and php artisan horizon:install. The defaults it gives you are fine for a laptop. A few of them are wrong for a real server, and the docs mention each one in passing, usually inside a warning box. These are the ones I change first.
tries defaults to 1
If you don't set tries on the supervisor and the job class has no $tries, Horizon gives each job one attempt. One. A payment webhook that hits a timeout from Stripe once is now a failed job, and nothing retries it.
I set tries on every supervisor and override it on the jobs that need more. There's one catch the docs call out: middleware like WithoutOverlapping and RateLimited use up attempts when they release a job back to the queue. A rate-limited job with tries => 3 can fail without its code ever running. For those I use tries => 0 (unlimited) with $maxExceptions on the job, so real exceptions still stop it.
Add backoff while you're there. 'backoff' => [1, 5, 10] waits 1, 5, then 10 seconds between retries. Without it a failing job retries instantly, which is exactly the wrong thing to do to an API that is already struggling.
timeout has to be shorter than retry_after
This is the setting that causes the strangest bugs. Horizon's timeout is how long a worker may run a job before it's killed. retry_after, in config/queue.php, is how long Redis waits before it assumes a job was lost and hands it to another worker.
If retry_after is shorter than the time a job really takes, a second worker picks up the same job while the first one is still working on it. You get two emails, two charges, two PDFs. The docs say timeout should be "at least a few seconds shorter" than retry_after. I keep a bigger gap than that, and I set both on purpose, never leave them at whatever the stub had.

There's a third number in the same family. When the auto strategy scales workers down, Horizon treats busy workers as hanging and force-kills them after the Horizon timeout. So the supervisor timeout must be larger than any job's own $timeout, or long jobs get cut off mid-way during a quiet moment. And if you run Horizon under Supervisor, stopwaitsecs has to be longer than your longest job too, or deploys kill work in progress.
auto balancing ignores your queue order
People write 'queue' => ['high', 'default'] and assume high goes first. With the default auto strategy it doesn't. Horizon gives workers to whichever queue looks busiest by its autoScalingStrategy (time, size or log), and the order in the array means nothing.
If priority matters, I use two supervisors: one for the important queue with its own minProcesses, one for everything else. Heavy work like image processing or PDF rendering gets its own supervisor with maxProcesses of 1 or 2, so a batch of 5,000 thumbnails can't eat every CPU on the box. If you want strict order and nothing clever, 'balance' => false processes queues in the listed order and still scales up when jobs pile up.
Workers that never restart
The defaults are memory => 128, maxJobs => 0 and maxTime => 0. So a worker restarts when it passes 128 MB, and otherwise runs forever. Long-running PHP processes leak, slowly, especially with big Eloquent collections or SDKs that cache things in static properties. I set maxJobs to something like 1,000 and maxTime to an hour. A restarted worker costs a fraction of a second.
The dashboard is closed in production, and that's correct
/horizon works only in the local environment until you edit the viewHorizon gate in HorizonServiceProvider. People hit a 403 after deploying and "fix" it by returning true. Don't. The dashboard shows job payloads, and payloads often hold emails, order data or tokens. Put real admin emails or a role check in that gate.
Related: Horizon reserves a Redis connection named horizon. Name one of your own connections that and things break in confusing ways.
The metrics page is empty
The Metrics tab stays empty until you schedule horizon:snapshot every five minutes:
Schedule::command('horizon:snapshot')->everyFiveMinutes();
That needs the scheduler running, which is its own cron entry or process. Retention is a count of snapshots, not days, so with trim_snapshots at 24 and a five-minute schedule you keep two hours of history.
Deploying it
Horizon is one long-running process, php artisan horizon, and it needs something to restart it when it dies. The docs show Supervisor. My preference is a systemd unit with Restart=always, which does the same job without another package. Either way, your deploy script runs php artisan horizon:terminate after the new code is in place. It lets current jobs finish, exits, and the process manager starts it again on the new code. Forget that step and the workers run last week's code until the next reboot.
If you'd rather not build all of this into a queue setup yourself, or you have one that keeps "losing" jobs, book a call with me. For the Node side of the same problem, I wrote about BullMQ, and if you're choosing the Redis underneath, Valkey vs Redis.
Introductory offer
Free cloud cost optimization. You only pay from what I save.
I cut your AWS, cloud, Supabase or Vercel bill for free and keep half of what I save for 6 months. Save nothing, pay nothing. Code, architecture and infrastructure.