Laravel queue:work Stop Reasons in Laravel 13.30 | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com) [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles  ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

  [ home ](https://www.msaied.com)    [ articles ](https://www.msaied.com/articles)    Laravel queue:work Now Prints Why the Worker Stopped        On this page       1. [  What Changed in Laravel 13.30 ](#what-changed-in-laravel-1330)
2. [  Console and JSON Output ](#console-and-json-output)
3. [  All Nine Stop Reasons ](#all-nine-stop-reasons)
4. [  Filtering JSON Output with jq ](#filtering-json-output-with-jq)
5. [  Using the WorkerStopping Event ](#using-the-workerstopping-event)
6. [  Key Takeaways ](#key-takeaways)

  ![Laravel queue:work Now Prints Why the Worker Stopped](https://cdn.msaied.com/629/bed93940d17b932032d64cee2e32d333.png)

 [  Laravel ](https://www.msaied.com/articles?category=laravel)  #Laravel   #Queue   #Laravel 13.30   #queue:work   #WorkerStopping  

 Laravel queue:work Now Prints Why the Worker Stopped 
======================================================

     3 Sep 2026      3 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   What Changed in Laravel 13.30  ](#what-changed-in-laravel-1330)
2. [  02   Console and JSON Output  ](#console-and-json-output)
3. [  03   All Nine Stop Reasons  ](#all-nine-stop-reasons)
4. [  04   Filtering JSON Output with jq  ](#filtering-json-output-with-jq)
5. [  05   Using the WorkerStopping Event  ](#using-the-workerstopping-event)
6. [  06   Key Takeaways  ](#key-takeaways)

 What Changed in Laravel 13.30
-----------------------------

Before Laravel 13.30, a `queue:work` process could exit for nine different reasons and the console output looked identical every time. If a worker managed by Supervisor restarted every few minutes, you had no quick way to tell whether it hit its memory limit, lost its database connection, or picked up a `queue:restart` signal from a deploy. You had to register an event listener or correlate the restart time against a deploy log.

Starting with Laravel 13.30, the worker prints a human-readable reason on its last output line:

```yaml
2026-09-01 13:20:40 Worker STOPPED Memory limit exceeded

```

Contributed by Jack Bayliss in [PR #61339](https://github.com/laravel/framework/pull/61339).

Console and JSON Output
-----------------------

`WorkCommand` now registers a listener for the `WorkerStopping` event alongside the existing job and queue status listeners. The stop line appears in the same two formats as the rest of the output.

With `--json`, the stop reason is a structured record:

```json
{"level":"info","status":"stopped","reason":"empty","exit_code":0,"jobs_processed":12,"memory":34.0,"timestamp":"2026-09-01T13:20:40.118273+00:00"}

```

Key fields to know:

- **`reason`** — the enum's backing value; stable to match on in scripts or log queries.
- **`memory`** — megabytes rounded to one decimal, or `null` when no figure was recorded.
- **`level`** — `info` for exit code 0, `warning` for anything else.

The stop line is suppressed under `--quiet` and `--silent`, and when the reason is `null`. Workers killed by an OOM killer or `SIGKILL` never reach the event dispatch code, so those exits remain silent.

All Nine Stop Reasons
---------------------

`WorkerStopReason` is an existing enum. This change added a `description()` method to it so the console output and any listener you write share the same strings.

| Value | Description | Exit code | |---|---|---| | `empty` | Queue empty | 0 | | `empty_for` | Queue empty for the configured duration | 0 | | `max_jobs` | Maximum jobs exceeded | 0 | | `max_time` | Maximum run time exceeded | 0 | | `restart_signal` | Received restart signal | 0 | | `interrupted` | Interrupted | 0 | | `lost_connection` | Lost connection | 0 | | `memory` | Memory limit exceeded | 12 | | `timed_out` | Job timed out | 1 |

Filtering JSON Output with jq
-----------------------------

Because the reason is now a discrete field, isolating stop events from a long log stream is a one-liner:

```bash
php artisan queue:work --json --max-time=3600 2>&1 | \
    jq -c 'select(.status == "stopped")'

```

Under a process manager writing to a file, the same `jq` query runs against the log after the fact.

Using the WorkerStopping Event
------------------------------

For anything beyond reading output—dashboards, metrics backends, alerting—the `WorkerStopping` event is still the right hook. It carries the reason, exit status, jobs processed, last-job timestamp, and memory in use:

```php
use Illuminate\Queue\Events\WorkerStopping;

Event::listen(function (WorkerStopping $event) {
    Log::info('Worker stopped', [
        'reason'  => $event->reason?->value,
        'status'  => $event->status,
        'jobs'    => $event->jobsProcessed,
        'memory'  => $event->memoryUsage,
    ]);
});

```

Use it to count exits per reason for a dashboard or push each one into a metrics backend.

Key Takeaways
-------------

- `queue:work` now prints a stop-reason line in both plain and `--json` output as of Laravel 13.30.
- Nine stop reasons are defined on the `WorkerStopReason` enum; each has a stable backing value and a new `description()` method.
- The `reason` field in JSON output is safe to match on in scripts and log queries.
- Workers killed by `SIGKILL` or an OOM killer remain silent—the event never fires in those cases.
- The `WorkerStopping` event is still the best integration point for dashboards and metrics.

---

*Source: [Laravel queue:work Now Prints Why the Worker Stopped — Laravel News](https://laravel-news.com/laravel-queue-worker-stop-reasons)*

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.msaied.com%2Farticles%2Flaravel-queuework-now-prints-why-the-worker-stopped&text=Laravel+queue%3Awork+Now+Prints+Why+the+Worker+Stopped) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.msaied.com%2Farticles%2Flaravel-queuework-now-prints-why-the-worker-stopped) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  Why does my Laravel queue:work process restart silently with no output?        Before Laravel 13.30, all nine stop reasons produced identical output, making it impossible to distinguish a memory limit hit from a restart signal or a lost database connection at a glance. Upgrading to 13.30 adds a stop-reason line to the last line of output, and a `reason` field to the `--json` format, so you can see exactly why the worker exited. 

      Q02  Will the stop reason appear if my worker is killed by an OOM killer or SIGKILL?        No. A worker killed externally by an OOM killer or a SIGKILL never reaches the code that dispatches the WorkerStopping event, so those exits remain silent. The stop-reason line only appears for the nine reasons tracked internally by the framework. 

      Q03  How can I programmatically react to specific queue worker stop reasons?        Listen to the `Illuminate\Queue\Events\WorkerStopping` event. It exposes `$event-&gt;reason?-&gt;value` (the stable enum backing value), `$event-&gt;status` (exit code), `$event-&gt;jobsProcessed`, and `$event-&gt;memoryUsage`. Use it to send metrics, trigger alerts, or log structured data to a dashboard. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://www.msaied.com/articles) 

 [ ![The Laracon Archive: 626 Talks, 287 Speakers, and 14 Years of Laravel History](https://cdn.msaied.com/628/13d8d0cef5fb083813df134cc253bb1b.png) laracon laravel community 

### The Laracon Archive: 626 Talks, 287 Speakers, and 14 Years of Laravel History

The Laracon Archive is a community-built, searchable index of every recorded Laracon talk — 626 talks from 287...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 3 Sep 2026     3 min read  

  Read    

 ](https://www.msaied.com/articles/the-laracon-archive-626-talks-287-speakers-and-14-years-of-laravel-history) [ ![Semantic Memory or Just Markdown? How Laravel Boost Manages AI Agent Project Rules](https://cdn.msaied.com/627/b162933f96fd615f3165bfe167816018.png) Laravel Boost AI Agents Context Engineering 

### Semantic Memory or Just Markdown? How Laravel Boost Manages AI Agent Project Rules

Laravel Boost tried semantic search with embeddings and a vector index to give AI coding agents project memory...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 3 Sep 2026     4 min read  

  Read    

 ](https://www.msaied.com/articles/semantic-memory-or-just-markdown-how-laravel-boost-manages-ai-agent-project-rules) [ ![Laravel New in 13: Features, Helpers, and Upgrade Notes](https://cdn.msaied.com/625/629cfac34ade7206a215809c0438c5ae.png) laravel php upgrade 

### Laravel New in 13: Features, Helpers, and Upgrade Notes

Laravel 13 ships with async-first primitives, tightened type contracts, and quality-of-life helpers that rewar...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 3 Sep 2026     3 min read  

  Read    

 ](https://www.msaied.com/articles/laravel-new-in-13-features-helpers-and-upgrade-notes) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://www.msaied.com)
- [Projects](https://www.msaied.com/projects)
- [Articles](https://www.msaied.com/articles)
- [Certificates](https://www.msaied.com/certificates)
- [Contact](https://www.msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
