Fixes & guides

Laravel queue jobs not running? A checklist from dispatch to worker

Jobs dispatched but never processed, stuck in the jobs table, or running old code? Work through the connection, the queue name, the worker, failed jobs and deploy restarts.

On this page
  1. 1. Is the job actually queued?
  2. 2. Is it on the queue the worker listens to?
  3. 3. Is a worker running?
  4. 4. Is it failing?
  5. 5. Is it running old code?
  6. Make jobs safe to run twice

When a Laravel job “does nothing”, it is stuck at one of five points: it was never queued, it went to a queue no worker listens to, no worker is running, the worker fails the job, or the worker runs old code. Check them in order.

1. Is the job actually queued?

Look at QUEUE_CONNECTION in .env:

  • sync runs jobs immediately in the same request. Nothing is queued, so no worker is needed (and none will help).
  • database stores jobs in the jobs table. Create it with php artisan make:queue-table and migrate, if it does not exist.
  • redis, sqs and others need the matching configuration in config/queue.php.

After changing .env in production, run php artisan config:clear (or config:cache again). A cached config keeps the old connection.

Also check the job class implements ShouldQueue. Without it, dispatch() runs the job synchronously.

2. Is it on the queue the worker listens to?

ProcessInvoice::dispatch($invoice)->onQueue('billing');

A worker started with php artisan queue:work only listens to the default queue. Name every queue, in priority order:

php artisan queue:work --queue=billing,default

For the database driver, you can see where jobs are waiting: select queue, count(*) from jobs group by queue;.

3. Is a worker running?

queue:work is a long-running process. If you started it in an SSH session, it stopped when you logged out. In production run it under a process manager such as Supervisor or systemd, or use Laravel Horizon for Redis. Check with ps aux | grep queue:work.

A job that is dispatched inside a database transaction may also run before the transaction commits and not find its data. Set 'after_commit' => true on the connection, or call ->afterCommit() when dispatching.

4. Is it failing?

php artisan queue:failed
php artisan queue:retry all

Failed jobs go to the failed_jobs table along with the exception. Run a worker in the foreground with -v to watch it happen. Two causes that look like “not running”:

  • Timeout and retry_after. If a job runs longer than the connection’s retry_after, another worker picks it up again. --timeout must be a few seconds shorter than retry_after.
  • Serialization. Models are re-fetched when the job runs. If the model was deleted, the job fails with ModelNotFoundException; add public $deleteWhenMissingModels = true; when that is expected.

5. Is it running old code?

Workers load your application once and keep it in memory. After every deploy run:

php artisan queue:restart

Otherwise workers keep executing the previous release’s job classes, which looks like your fix “not working”.

Make jobs safe to run twice

Queues deliver at least once. A retry after a timeout, or a webhook that arrives twice, can run the same work again. Make jobs idempotent with ShouldBeUnique, a WithoutOverlapping middleware, or a database check, as described in handling duplicate webhooks.

Found a mistake or something out of date? Tell us and we will fix it. See our editorial policy.

A good place to start

What are you working on?

Tools, guides, PHP versions and the archive.

ToolJSON ↔ PHP arrayConvert JSON to a PHP array literal with short or array() syntax, or turn a PHP array back into JSON. Runs in your browser; nothing is uploaded.ToolSerialized data inspectorRead PHP serialized strings as a tree, find wrong string lengths after a search-and-replace, and rebuild them with correct byte counts. Parsed safely in your browser.ToolComposer constraint testerSee exactly which versions a Composer constraint such as ^2.1, ~1.4 or >=8.1 <8.4 allows, in plain English, and test versions against it.ToolPHP date() format builderBuild a PHP date() or DateTime::format() string with a live preview in any time zone, plus a reference for every format character.ToolPHP upgrade checklistPick your current and target PHP versions and get every breaking change, deprecation and tooling step in between, as a checklist you can copy.GuideAllowed memory size exhaustedWhat PHP's memory_limit fatal error means, how to tell a real leak from a big job, and fixes for the usual causes: loading whole tables, unbounded arrays, Composer and recursion.GuideComposer dependency conflictsA step-by-step way to read Composer's conflict output, find the package that is blocking you, and fix it without --ignore-platform-reqs or deleting the lock file.Guidecomposer install vs updatecomposer install reproduces composer.lock; composer update rewrites it. Here is what each command does, when to use which, and a safe production deploy routine.GuideComposer uses the wrong PHP versionComposer says "your php version (8.1.x) does not satisfy that requirement" when your server runs 8.3? The cause is usually the CLI binary, config.platform.php, or platform_check.php.GuideEloquent N+1 queriesHow to spot N+1 queries in Laravel, fix them with eager loading, withCount() and constrained loads, and make Laravel throw an exception the next time one slips in.GuideHeaders already sentThe warning names the file and line that produced output. Here is how to read it, the five usual culprits (BOM, whitespace, echo, warnings, closing tags) and fixes that do not just hide it.GuideWriting a talk proposalWhat reviewers look for in a call-for-papers submission: a specific title, an abstract for attendees, notes for the committee, and a talk-sized idea. With a worked example and a checklist.GuideLaravel queue jobs not runningJobs dispatched but never processed, stuck in the jobs table, or running old code? Work through the connection, the queue name, the worker, failed jobs and deploy restarts.PHP versionsWhat's new in PHP 8.4PHP 8.4 (released 21 November 2024) brought property hooks, public private(set) visibility, new without parentheses, lazy objects, an HTML5 DOM parser and array_find(). Plus the deprecations that matter.PHP versionsWhat's new in PHP 8.5PHP 8.5 (released 20 November 2025) added the |> pipe operator, a standards-compliant URI extension, clone() with property overrides, #[\NoDiscard] and array_first()/array_last().PHP versionsWhat's new in PHP 8.6PHP 8.6 was released on 19 November 2026. Partial function application, clamp(), readonly property defaults, Io\Poll and Time\Duration, plus the session and ValueError changes to check before upgrading.GuidePHP array to JSONWhy json_encode() sometimes gives you an object instead of a list, how to keep floats and slashes intact, and how to catch the silent false that malformed UTF-8 returns.GuideDuplicate webhooks in PHPWebhook providers retry, so the same event can arrive twice. Verify the signature, record the event ID with a unique key, answer fast and process in a queue: a pattern that works in plain PHP, Laravel and Symfony.GuidePHPStan baseline for legacy codeGenerate a PHPStan baseline, stop new errors from getting in, then raise the level step by step. A tested routine for old PHP codebases.GuidePSR-4 autoloadingHow PSR-4 maps namespaces to folders, how to configure it in composer.json, and why "Class not found" happens: case, typos, a stale autoloader or a namespace that does not match the path.GuideSerialized data broken after search-replaceChanging a domain name with SQL REPLACE() or sed corrupts PHP serialized strings because their byte lengths no longer match. Here is how to spot it and repair it safely.GuideUpgrade PHP with RectorUpgrade a PHP application one version at a time: pin the baseline, let Rector rewrite syntax, let PHPStan find what Rector cannot, and prove it with tests before you switch runtimes.PHP versionsSupported PHP versionsRelease, active support and end-of-life dates for every PHP version.ArchiveSunshinePHP talk archive 2013–2020Talk titles and speakers from eight years of the Miami PHP conference.ArchiveSpeaker indexEveryone who spoke at SunshinePHP, A to Z.