Laravel Queues are the backbone of any serious Laravel application that handles background work, from sending emails to processing imports. In 2026, with high-availability architectures, edge deploys, and zero-downtime expectations, the way you pause and resume your queues during a code release makes or breaks a deployment. Get it wrong, and you end up with stale jobs running against new code, duplicate processing, or worse, a pile of failed jobs that nobody notices for hours.
The trick is a feature that landed in Laravel 13.25: a global pause switch backed by a single cache key. It stops workers from reserving new jobs without touching HTTP traffic, killing the race conditions that plagued the old queue:restart approach. This guide walks through how it works, why the older method falls short, and how to wire it into a clean, observable deployment pipeline.
What Are Laravel Queues and Why Pause Them During Deployments?
Laravel Queues 101
Laravel Queues are a deferred-execution system. A controller dispatches a job, the job is serialized and pushed onto a backend (Redis, SQS, Beanstalkd, or the database), and a worker process pulls it off the queue and runs it. Your HTTP request returns in milliseconds, while a heavy import or webhook delivery happens minutes later in the background.
The disconnect between dispatch time and execution time is exactly what makes deployments dangerous. If you push new code while a worker is mid-flight on the old code, you risk anything from harmless serialization drift to outright data corruption.
Deployment Race Conditions
A race condition during a queue-backed deploy usually looks like this: Worker A is executing Job X using the old User model. The deploy ships a migration that renames a column. Worker A tries to save the model, throws an error, the job retries three times, fails permanently, and ends up in the failed_jobs table. Multiply that by a few hundred workers and you have a support nightmare.
Pausing the queue before the deploy gives every in-flight job a chance to finish under the old schema, then you ship the new code, then you resume. No half-migrated database, no half-versioned job payloads.
The Pause Problem
The naive solution, php artisan down, takes the entire site offline. That is overkill if you only want to stop background work. Laravel now offers a surgical alternative: a global pause that affects workers and nothing else.
Definition: A queue pause temporarily stops workers from reserving new jobs while allowing already-running jobs to finish. It does not affect HTTP traffic, the dispatch side of the queue, or the job payload itself.
Current Trends and the Need for Queue Pausing in Modern Laravel Apps
High-Availability Architectures
Multi-region, active-active deployments are now the default for serious Laravel apps. If you are running a fleet of workers behind Kubernetes, ECS, or a managed Laravel Cloud setup, you cannot afford to bounce every worker container during a release. The global pause lets you drain the workers gracefully while web pods continue serving traffic.
Serverless and Edge Deployments
On platforms like Laravel Cloud, Vapor, or AWS Lambda-backed Laravel, worker processes are short-lived by design. Cold starts are common, and the only way to coordinate them is through shared state. A cache-key pause, readable by every worker regardless of where it boots, is the cleanest contract for serverless-style queues.
Developer Experience Expectations
Developers in 2026 expect a single command to spin up the full local environment: HTTP server, Vite, queue worker, log viewer. The new artisan dev command, powered by @laravel/multiplex, delivers exactly that, with a tabbed terminal UI that makes pausing and inspecting workers painless during local testing.
Tools, Packages, and Environment Setup for Queue Pausing
Laravel Version & Dependencies
The global pause feature requires Laravel 13.25 or later. Earlier versions only support per-queue pause via the cache, which is more verbose to manage at scale. Run php artisan --version to confirm your baseline, and update through Composer if you are behind.
Cache Drivers (Redis, Valkey, etc.)
Your cache driver matters more than people think. The global pause key has to be readable by every worker, instantly, across the fleet. Redis, Valkey, Memcached, and the database cache driver all qualify. File cache and array cache do not, because they are per-process or per-host and would give you phantom pauses on a single worker while others keep grinding.
For Redis specifically, you want phpredis 5.3.2 or newer, which adds ACL auth support and refined backoff options. If you are on Laravel 13.5, you also get first-class Redis Cluster support, with hash tags to keep queue-related keys on the same slot.
@laravel/multiplex Installation
For local development, install @laravel/multiplex via npm (or pnpm, Yarn, or Bun) to replace the older concurrently package that used to power artisan dev. It gives you a tabbed UI where each process gets its own panel. macOS and Linux are fully supported; Windows falls back to the concurrently implementation.
Artisan Dev Command Basics
Once the package is in place, php artisan dev starts the development server (php artisan serve), the queue worker (php artisan queue:listen), the log viewer (Pail), and Vite, all in one terminal. You can list the registered processes with php artisan dev:list, which is handy for verifying custom registrations before launch.
How to Implement a Global Queue Pause Using the Cache Key
Setting the Pause Key
The simplest deployment script looks like this:
# 1. Stop new work
php artisan queue:pause --all
# 2. Deploy
php artisan migrate --force
git pull origin main
composer install --no-dev --optimize-autoloader
npm run build
# 3. Resume
php artisan queue:resume --all
Behind the scenes, queue:pause --all calls Queue::pauseAll(), which writes a single key to your cache: queues:pause:all (or similar, depending on the cache prefix). Workers check that key before each job reservation.
Checking the Key in Workers
You do not need to write this check yourself. Laravel's queue manager queries the cache on every reservation attempt. If the global pause key exists, the worker sleeps briefly and tries again. The job that is currently being processed finishes normally. New jobs sit in the queue, untouched, until you flip the switch back.
Best Practices for Key Namespacing
If you have multiple environments pointing at the same Redis instance, namespace your cache prefix. The CACHE_PREFIX environment variable is the right knob. Without it, a staging deploy that pauses all queues could accidentally pause production, because they share the same cache keyspace.
Verdict: For most teams,queue:pause --allis the right default. UseQueue::pause('redis', 'imports')only when you need surgical control over a single named queue.
Why queue:restart Falls Short and How to Avoid Stale Jobs
Signal vs. Immediate Pause
queue:restart writes a timestamp to the cache and tells workers to exit after their current job. The current job finishes, the worker process dies, and your supervisor (systemd, Horizon, Kubernetes) restarts it. That is a graceful signal, not a pause.
The problem: between the moment you call queue:restart and the moment every worker actually exits, jobs are still being reserved. If your deploy is fast, the race window is small but real. If a worker is in the middle of a long-running job (say, a 10-minute report export), the entire deploy stalls waiting for it.
Race Conditions with queue:restart
The Laravel News coverage of the global pause feature highlights this exact scenario. With queue:restart, a worker can reserve a job after you have started the deploy but before the worker has noticed the signal. That job is now running against the new code, which may not be backward compatible with the old payload format.
Performance Impact
Constantly bouncing workers is wasteful. Each restart costs you a PHP boot, an autoloader warm-up, and a connection handshake to your cache and database. If you deploy ten times a day across fifty workers, that is a measurable amount of CPU time and latency noise. The cache-key pause avoids this entirely because workers stay alive; they just stop reserving new jobs.
Managing Queues and Vite with the Single Terminal UI
Starting the Dev Server
Running php artisan dev in a fresh terminal launches four default processes: the HTTP server, the queue listener, the Pail log tail, and Vite. Each one gets its own tab. You can switch between them with the keyboard, and the package handles color coding so you can tell at a glance which process is which.
For non-TTY environments (CI, Docker exec with no terminal), the command falls back to inline mode, which prints plain text without a UI. Stream mode is available with php artisan dev --stream for an interleaved feed when you want everything in one scrollable buffer.
Launching Queue Workers
The default queue process is php artisan queue:listen --tries=1 --timeout=0. In a real project, you usually want to swap that for Horizon. You can do that in your AppServiceProvider boot method:
use Laravel\Multiplex\DevCommands;
DevCommands::artisan('horizon', 'queue');
Now the queue tab runs Horizon instead of the bare listener, and your dev environment mirrors production. You can also bring in Reverb for broadcasting, Stripe CLI for webhook forwarding, and even a TypeScript compiler in watch mode, all with one-line registrations.
Monitoring Logs & Errors
The Pail tab streams application logs in real time. If a queued job throws, you see the stack trace in the same terminal where the worker is running, which makes debugging dramatically faster. Pair this with Vigilance or Watchtower for a broader view across all your environments.
Performance, Reliability, and Developer Experience in Practice
Latency Overhead
The cache lookup on each reservation is one extra round trip to Redis. At sub-millisecond latency on a local Redis, that is invisible. On a remote Redis with 2ms RTT, the impact is small but non-zero. If you are processing tens of thousands of jobs per minute, consider caching the pause state in a local APCu key refreshed every second.
Worker Restart Frequency
Because the global pause does not require workers to exit, you can deploy without any worker churn. That means fewer connection resets to Redis, fewer cold starts for the PHP runtime, and more predictable p99 latency. In a Redis Cluster setup especially, fewer worker restarts means fewer cluster slot migrations and less chance of hitting CROSSSLOT errors.
Impact on Production Traffic
Zero. That is the headline. While the queues are paused, your web pods continue serving requests at full speed, your cron jobs keep running, and your database takes its normal load. Only the queue workers change behavior, and they are doing nothing but sleeping anyway.
| Target Persona | Recommended Option | Key Reason & Real-World Benefit |
|---|---|---|
| Solo developer on a small SaaS | queue:pause --all + artisan dev | Three commands, no ceremony. Get clean local testing and zero-downtime deploys without building tooling. |
| Mid-size team on Laravel Cloud | Queue::pauseAll() in a deployment hook + Vigilance | Programmatic control fits GitHub Actions cleanly, and Vigilance surfaces failed jobs the moment a deploy goes wrong. |
| Enterprise with Kubernetes workers | Global pause + Watchtower + custom Gate | Multi-tenant dashboards, gate-based access, and Slack alerts for any queue stuck in pause longer than five minutes. |
| AI-heavy product (Laravel AI Tasks) | Global pause + idempotency keys + Vigilance RUM | AI jobs are expensive; pausing them mid-deploy prevents duplicate spend, and idempotency keys handle the rest. |
When to Use Cache-Key Pause vs. queue:restart
Pros of Cache-Key Pause
Workers stay alive, so no warm-up cost. The pause is instantaneous across the entire fleet, and it composes with per-queue pauses, so you can keep an intentionally paused queue paused while resuming the rest. The QueuesPaused and QueuesResumed events make it easy to wire up Slack notifications or audit logs.
Cons and Edge Cases
The global pause does not automatically clear individual queue pauses. If you have a per-queue pause set on imports and then call resume --all, the imports queue stays paused. That is intentional, but it surprises people. Document it in your runbook.
You also need a shared cache backend. If a worker is misconfigured with the array driver (common in test suites), the pause key set by your production cache will not be visible to that worker. The job will run.
Recommended Workflow
For 99% of deployments, use queue:pause --all before the deploy, ship your code, then queue:resume --all after. Reserve queue:restart for major PHP version upgrades or cases where you actually need a clean worker process.
Common Mistakes and How to Fix Them
Missing Cache Driver
If you see workers still pulling jobs after queue:pause --all, check CACHE_DRIVER. Anything other than file or array should be fine. The fix is usually setting CACHE_DRIVER=redis in your .env and restarting workers so they pick up the new config.
Stale Jobs After Pause
Sometimes a job is mid-flight when you trigger the pause, and it takes longer than expected to finish. If your deploy script is impatient, it will run migrations that the in-flight job is incompatible with. Add a small grace period (a 30-second sleep, or a health check that confirms zero in-flight jobs via Horizon's API) before pushing the migration step.
Worker Crashes
A worker crash during a pause is harmless. The supervisor restarts the worker, the worker checks the pause key, sees it is set, and goes back to sleep. The whole point of the cache-key design is that crash recovery does not need to know about deploys.
Choosing the Right Approach for Your Team
Small Projects
One repository, one environment, two or three workers. Wrap the queue:pause and queue:resume commands in your deploy script. Done. Add artisan dev locally for the tabbed experience.
Enterprise-Scale
Multiple environments, hundreds of workers, strict audit requirements. Use Queue::pauseAll() in a deployment controller, fire the QueuesPaused event to a Slack channel, and require a human approval step in your CI/CD pipeline before Queue::resumeAll() runs. Watchtower's gate-based access control and alert channels fit this naturally.
CI/CD Pipelines
GitHub Actions, GitLab CI, or Buildkite. Add a step that calls php artisan queue:pause --all via SSH or your deployer's API, runs the deploy, and only resumes after a smoke test passes. If the smoke test fails, leave the queues paused; you can resume manually once the issue is resolved.
Serverless Deployments
On Laravel Cloud or Vapor, the platform handles worker lifecycle, but you can still hook into the deploy lifecycle. Set the pause key from a Vapor hook script, let the platform roll out new containers, and clear the pause key once the rollout is complete. The shared Redis cluster that Vapor provisions works out of the box.
People Also Ask About Pausing Laravel Queues
Can I pause queues without affecting HTTP traffic?
Yes. The global pause writes a cache key that only workers check. Your web server, routes, and middleware are untouched. This is the main reason the feature exists; php artisan down is too blunt for a queue-only operation.
Is @laravel/multiplex required?
No. It is the recommended UI for local development, but the production pause logic is independent of it. You can run artisan dev without @laravel/multiplex installed; the command will fall back to inline mode on Windows or use concurrently as a fallback package.
How to resume queues after deployment?
Run php artisan queue:resume --all from the same environment that called queue:pause --all. If you paused programmatically with Queue::pauseAll(), call Queue::resumeAll(). Verify with Queue::isPaused('redis', 'default') for any individual queue you are worried about.
Conclusion and Next Steps
Laravel Queues are one of those features that look simple until you operate them at scale. The global pause switch introduced in Laravel 13.25, backed by a single cache key, is the cleanest way to coordinate workers and deploys in 2026. It beats queue:restart on speed, beats php artisan down on surgical precision, and gives you the events you need to wire up monitoring.
Next Steps for Implementation
- Verify you are on Laravel 13.25 or later, and your cache driver is shared across workers.
- Add
php artisan queue:pause --allandphp artisan queue:resume --allto your deploy script, with a smoke test between them. - Install
@laravel/multiplexlocally and runphp artisan dev:listto see the registered processes. - Hook the
QueuesPausedandQueuesResumedevents into your Slack channel or audit log. - If you operate at scale, deploy Watchtower or Vigilance for the dashboard and alerts; configure sample rate and retention so the monitoring database does not grow unbounded.
Start with the simple three-command deploy, then layer on monitoring and CI/CD integration as your team grows. The pause primitive is the foundation; everything else is plumbing on top.