Laravel queues do their best work when nobody is watching them. That is also the problem. A queue can be stuck for hours while your app keeps returning 200s, because nothing fails loudly until a user complains that an email never arrived or a webhook never fired. Laravel Horizon fixes the visibility part, but only if you actually configure its monitoring instead of just installing it and opening the dashboard once.
This post covers the Horizon setup I use to catch queue trouble early: wait-time thresholds, supervisor balance, and notifications that reach me before a user does. It assumes a Laravel app already running Redis queues. If your jobs are failing silently rather than piling up, read why Laravel queue jobs fail silently first, because monitoring a queue that swallows errors is a different problem.
What Horizon actually watches
Horizon is a dashboard and a process manager for Redis queues. Its master supervisor starts worker processes per queue, and it records throughput, runtime, and wait times in Redis. The two numbers that matter most are queue wait time (how long a job sits before a worker picks it up) and failed job count. Throughput is nice to see. Wait time is what pages you, because a growing wait time means your workers cannot keep up with incoming jobs, whatever the cause.
Horizon also keeps a snapshot of recent jobs, so when something does go wrong you can see exactly which job, on which queue, with which payload, failed or stalled. That beats grepping logs after the fact.
Set the wait thresholds in config/horizon.php
Horizon only alerts you about waits you have told it to care about. In config/horizon.php, the waits array maps each connection and queue to a maximum wait in seconds:
'waits' => [
'redis:default' => 60,
'redis:emails' => 120,
'redis:reports' => 300,
],
Pick thresholds from what the queue is for, not from one global number. A password-reset email waiting 60 seconds is a problem. A nightly report waiting five minutes is normal. When a queue's wait exceeds its threshold, Horizon fires a LongWaitDetected event, which is what its notification channels listen for. No threshold, no alert, no matter how red the dashboard looks.
Wire notifications to somewhere you will see them
A dashboard nobody opens is not monitoring. Horizon can send notifications by mail, Slack, and SMS. In config/horizon.php, set the Slack webhook:
'notifications' => [
'slack' => [
'webhook_url' => env('HORIZON_SLACK_WEBHOOK_URL'),
],
],
Then route the notifications in your AppServiceProvider:
use Laravel\Horizon\Horizon;
Horizon::routeSlackNotificationsTo(
config('horizon.notifications.slack.webhook_url')
);
Either way, the alert has to land in a channel someone checks during the day, and ideally one that buzzes a phone after hours for the queues that matter. A Slack channel that only the on-call engineer mutes is no better than the dashboard.
Balance supervisors against real load, not guesses
Each supervisor in config/horizon.php defines a queue, a balance mode, and process limits:
'environments' => [
'production' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default', 'emails'],
'balance' => 'auto',
'minProcesses' => 1,
'maxProcesses' => 10,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'tries' => 3,
],
],
],
The auto balance mode scales workers up when a queue grows and down when it shrinks, within your min and max. That is the setting to use unless you have measured a reason not to. Two mistakes I see often: maxProcesses set so high that a burst of jobs exhausts the database connection pool, and balance left at simple with one process per queue while traffic triples. Check the wait times after a deploy and after a traffic spike, then adjust the max. Horizon shows you the numbers to base that decision on.
Keep the daemon itself healthy
Horizon runs as a long-lived daemon, usually under Supervisor, and needs the same care as any other daemon. Three habits that have saved me:
First, restart it on every deploy. Horizon caches your code, so a deploy without a restart leaves workers running old code. Add php artisan horizon:terminate to your deploy script; the process manager restarts it and the new code loads.
php artisan horizon:terminate
Second, check its status as part of your health checks, not just the web app. php artisan horizon:status tells you whether the master supervisor is running, paused, or down. If the daemon dies, queues silently stop processing, and the first symptom is a user complaint hours later.
php artisan horizon:status
php artisan horizon:snapshot
Third, prune old metrics. Horizon keeps job and metric data in Redis, and on a busy app that grows. php artisan horizon:purge clears completed jobs older than the retention window. Run it on a schedule so your Redis instance does not fill up with history nobody reads.
The checklist before you call it done
Installing Horizon takes ten minutes. Making it page you is configuration, not code. Set a wait threshold per queue based on what that queue is for. Route LongWaitDetected notifications to a channel a human watches. Pick supervisor limits from measured load, and re-check them after traffic changes. Restart Horizon on every deploy, verify its status in your health checks, and prune old metrics on a schedule. Do that, and the next time a queue stalls, your own alert will tell you in minutes, not a user.