Welcome to HowToShipIt — practical how-to guides for developers: code, AI tools, and servers, explained step by step.

Laravel Horizon: Monitor Redis Queues Like a Pro (2026)

Your queues are working. Can you prove it?

If you run Laravel queues in production, you already know the failure mode: nothing crashes, nothing pages you, and yet emails arrive three hours late, a report job silently retries itself into a loop, and the first person to notice is a customer. Laravel Horizon is the official answer to that blindness. It is a dashboard and a process supervisor for your Redis queues: it shows throughput, wait times, failed jobs and worker status in real time, and it scales your workers up and down as load changes.

This guide walks through a complete Laravel Horizon setup: install, supervisor configuration, production process monitoring, metrics, tagging, and wait-time alerts — verified against the Laravel 13.x Horizon documentation on 30 October 2026.

When Horizon is worth it (and when it is not)

Horizon earns its keep the moment queues stop being a toy. If you have more than one queue, jobs that must finish within minutes rather than hours, or a production incident you only discovered from a support ticket, you need visibility. Horizon gives you a live view of every queue’s depth, how long jobs wait before a worker picks them up, and which jobs failed and why.

There is one hard requirement: Laravel Horizon requires Redis to power your queue. If your queue connection is set to database, Horizon will not work for you — the database driver is not supported. Horizon is also not compatible with Redis Cluster. If you are still on the database driver, get Redis running first, then come back. Either Redis client works at the queue-driver level: predis/predis or the phpredis PHP extension, selected with REDIS_CLIENT.

If you run a single queue with a handful of jobs a day, Horizon is overkill — plain queue:work under Supervisor, as covered in our Laravel queue workers guide, is enough. Everything below assumes you have outgrown that.

Step 1: Install Laravel Horizon

Install the package and publish its assets:

composer require laravel/horizon
php artisan horizon:install
php artisan horizon

The horizon:install command publishes Horizon’s primary configuration file to config/horizon.php along with its dashboard assets. Note what is not in the install steps: there is no separate migrate step for Horizon itself. (A failed-jobs database table, created with queue:failed-table plus migrate, is a separate Laravel queue feature, not part of installing Horizon.)

Once Horizon is running, open /horizon in your browser. By default you can only access the dashboard in the local environment — in production it is locked behind a gate, which we will configure below.

One naming trap to avoid: Horizon uses a Redis connection named horizon internally. Do not assign that name to another Redis connection in config/database.php, or to the use option in config/horizon.php.

Step 2: Configure your supervisors

All Horizon configuration lives in config/horizon.php, under environments. Each environment (production, local, plus an optional * wildcard fallback) holds named supervisors, and Horizon picks the environment from APP_ENV. A supervisor is simply a worker pool: which Redis connection, which queues, and how many processes.

Here is a production supervisor worth starting from, based on the documentation’s own example values:

'environments' => [
    'production' => [
        'supervisor-1' => [
            'connection' => 'redis',
            'queue' => ['critical', 'default', 'low'],
            'balance' => 'auto',
            'minProcesses' => 1,
            'maxProcesses' => 10,
            'balanceMaxShift' => 1,
            'balanceCooldown' => 3,
            'tries' => 3,
            'timeout' => 60,
        ],
    ],
],

The keys that matter most:

  • balance — how workers are shared across queues. See the strategies below.
  • minProcesses / maxProcesses — the floor and ceiling per supervisor. maxProcesses of 0 means spawn no processes at all.
  • tries — if you leave it unset, Horizon defaults to a single attempt, unless the job class defines its own $tries. A value of 0 means unlimited attempts, so set a cap with $maxExceptions on the job if you go that route.
  • timeout — seconds before a worker is forcefully terminated. Two rules from the docs: the Horizon timeout should be greater than any job-level timeout, and at least a few seconds shorter than retry_after in config/queue.php — otherwise a job can run twice.
  • memory (default 128 MB), maxJobs (default 0, no restart by job count), maxTime (default 0), sleep (default 3 seconds), backoff (seconds before retrying after an unhandled exception; an array like [1, 5, 10] gives exponential backoff).

The three balance strategies

In Laravel 13.x, auto is the default balance strategy — older guides that say simple is the default are out of date, so do not copy them.

  • auto — Horizon shifts workers toward whichever queue has the most work. If notifications has 1,000 jobs and default is empty, workers move to notifications until it drains. balanceMaxShift and balanceCooldown cap how fast that shift happens (the docs’ example, 1 process every 3 seconds, keeps scaling from thrashing). autoScalingStrategy picks the signal: time (estimated time to clear the queue), size (job count), or log (logarithm of job count, so one huge queue cannot hog every worker). Note that auto does not enforce strict queue priority — queue order does not matter. If one queue must always win, give it its own supervisor.
  • simple — splits a fixed processes count evenly across queues (10 processes across default and notifications means 5 each). No auto-scaling.
  • false — processes queues strictly in listed order, like Laravel’s default queue system, but still scales worker count up if jobs accumulate.

A practical rule: use auto for your general supervisor, and a second supervisor with its own queue list for anything latency-critical, like password-reset emails or payment webhooks. That is the only reliable way to guarantee priority.

Step 3: Run Horizon in production with Supervisor

Horizon replaces queue:work as the thing your process monitor runs. It is a single master process that spawns and manages its own workers, which is why the official Supervisor block has no numprocs line — do not add one from a third-party guide and attribute it to the docs.

On Ubuntu, install Supervisor and create /etc/supervisor/conf.d/horizon.conf:

[program:horizon]
process_name=%(program_name)s
command=php /home/forge/example.com/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=true
stdout_logfile=/home/forge/example.com/horizon.log
stopwaitsecs=3600

Then activate it:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start horizon

Set stopwaitsecs higher than your longest-running job, or Supervisor may kill a job mid-processing during a restart. Adjust the paths and the user to your own deploy user — the forge values above are the docs’ example, not a prescription.

Deploying new code: use horizon:terminate

This is the mistake that bites every first-time Horizon deployment. When you ship new code, restart Horizon with:

php artisan horizon:terminate

Horizon finishes the jobs currently being processed, stops, and your process monitor restarts it with the fresh code. Do not use php artisan queue:restart here — that is the equivalent command for plain queue:work processes, and it does not reload Horizon’s supervisor configuration. If deploys seem to “not take” on a Horizon server, this is almost always why.

Other commands worth knowing: horizon:pause and horizon:continue (pause all processing), horizon:pause-supervisor / horizon:continue-supervisor, horizon:status, and horizon:supervisor-status supervisor-1 for a quick health check from the terminal.

Step 4: Lock down the dashboard

Remember: the dashboard is open only in local by default. For any other environment, access is controlled by a gate in app/Providers/HorizonServiceProvider.php:

protected function gate(): void
{
    Gate::define('viewHorizon', function (User $user) {
        return in_array($user->email, ['you@yourcompany.com']);
    });
}

Put your own email addresses in that list — the taylor@laravel.com value in the docs is a placeholder. If you protect the dashboard another way (for example, IP restriction at the web server) and nobody logs in, change the closure signature to function (User $user = null) so Laravel does not require authentication.

Do not leave the dashboard open to the internet. It shows job payloads, which routinely contain email addresses, order details, and internal IDs. Treat /horizon like production database access.

Step 5: Turn on metrics (and know what they keep)

The Metrics tab shows job and queue wait times and throughput — the numbers that tell you whether “slow” is a worker shortage or a slow job. It only fills up if you schedule snapshots. In routes/console.php:

Schedule::command('horizon:snapshot')->everyFiveMinutes();

Retention is by count, not age: metrics.trim_snapshots in config/horizon.php (the docs’ example keeps 24 job snapshots and 24 queue snapshots). At a five-minute cadence, 24 snapshots cover about two hours — so if you want a week of history, raise those numbers deliberately. To wipe metrics entirely, run php artisan horizon:clear-metrics. Individual jobs can be forgotten with horizon:forget, and horizon:clear empties queues (--queue=emails targets one queue).

Step 6: Tag jobs so you can actually find them

Horizon auto-tags jobs by scanning their properties for Eloquent models. Dispatch a RenderVideo job carrying Video id 1 and it is tagged App\Models\Video:1 automatically — and this also covers mailables, broadcast events, notifications, and queued event listeners.

For anything the auto-tagger cannot guess, define a tags() method on the job:

public function tags(): array
{
    return ['render', 'video:'.$this->video->id];
}

Tag by the business object (the video, the order, the tenant), not by the job class alone. When a customer reports a stuck export at 2am, you want to search one tag and see every related job — pending, failed, and completed — instead of scrolling the recent-jobs list.

Step 7: Get alerted before users notice

Horizon’s waits configuration sets a long-wait threshold per queue, in seconds:

'waits' => [
    'redis:critical' => 30,
    'redis:default' => 60,
    'redis:batch' => 120,
],

The format is <connection>:<queue> => <seconds>. Any combination you do not list defaults to 60 seconds, and setting a threshold to 0 disables long-wait notifications for that queue.

When a wait breaches its threshold, Horizon notifies through exactly three channels, configured in the service provider’s boot() method:

Horizon::routeMailNotificationsTo('alerts@yourcompany.com');
Horizon::routeSlackNotificationsTo('https://hooks.slack.com/...', '#alerts');
Horizon::routeSmsNotificationsTo('15556667777');

Mail, Slack, and SMS — that is the full list in the docs. For SMS, check the notification-channel prerequisites linked from the Horizon docs before wiring it up — the webhook URL and channel go in as arguments to the route methods above.

Start with thresholds you will actually act on: 30 seconds for critical queues, 60 for default, a few minutes for batch work. An alert you ignore trains you to ignore all of them.

Five Laravel Horizon mistakes to avoid

  • Restarting with queue:restart instead of horizon:terminate — your new code never loads into the supervisor.
  • Running Horizon on the database queue driver — it requires Redis, full stop, and Redis Cluster is not supported.
  • Setting the Horizon timeout shorter than retry_after by too little — the docs want the Horizon timeout at least a few seconds shorter than retry_after, and greater than any job-level timeout, or jobs run twice.
  • Naming another Redis connection horizon — Horizon reserves that connection name internally.
  • Leaving /horizon publicly reachable — job payloads are sensitive data. Gate it.

Your 10-minute Horizon checklist

  1. Set QUEUE_CONNECTION=redis and confirm Redis is reachable.
  2. composer require laravel/horizon, php artisan horizon:install, php artisan horizon.
  3. Configure one auto supervisor per environment, with sane minProcesses / maxProcesses and a tries value.
  4. Put Horizon under Supervisor with the official block, and add horizon:terminate to your deploy script.
  5. Gate the dashboard to your team’s emails.
  6. Schedule horizon:snapshot every five minutes and set waits thresholds you will act on.
  7. Tag jobs by business object, and keep slow work off the request path — if you have not already, read our guide to speeding up Laravel queries before you blame the queue for a slow page.

Once that is in place, the next queue incident looks very different: instead of a customer telling you something is late, Horizon tells you a queue breached its wait threshold, you open the dashboard, and you see exactly which jobs are stuck and why. That is the whole point — queues you can see are queues you can fix.

Further Reading & References

Facts verified 30 October 2026 against the official Laravel 13.x Horizon documentation.

Leave a Comment