Laravel queue:work Stop Reasons in Laravel 13.30 | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. [Laravel](https://www.msaied.com/public/articles?category=laravel)
6. /
7. Laravel queue:work Now Prints Why the Worker Stopped

   [Laravel](https://www.msaied.com/public/articles?category=laravel) 

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

 Laravel 13.30 adds a stop-reason line to queue:work output. Workers now print why they exited—memory limit, restart signal, job timeout, and more—in both plain and JSON formats.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 3 Sep 2026 · Updated 4 Sep 2026 · 3 min read

ShareCopy linkCopied

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

  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)

 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)*

- [Laravel](https://www.msaied.com/public/articles?search=Laravel)
- [Queue](https://www.msaied.com/public/articles?search=Queue)
- [Laravel 13.30](https://www.msaied.com/public/articles?search=Laravel%2013.30)
- [queue:work](https://www.msaied.com/public/articles?search=queue%3Awork)
- [WorkerStopping](https://www.msaied.com/public/articles?search=WorkerStopping)

 Frequently asked questions 
---------------------------

  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.

   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.

   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.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

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

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleThe Laracon Archive: 626 Talks, 287 Speakers, and 14 Years of Laravel History](https://www.msaied.com/public/articles/the-laracon-archive-626-talks-287-speakers-and-14-years-of-laravel-history) [Next articleLaravel August 2026 Product Updates: Framework, Cloud, and Forge](https://www.msaied.com/public/articles/laravel-august-2026-product-updates-framework-cloud-and-forge)  

   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)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
