On this page · 5 sections
Laravel 13.34.0 to 13.38.0, released between September 29 and October 20, change how queue workers treat jobs at the edges: timeouts, crashes and memory limits. The release notes give only titles, so this guide follows the pull requests behind them, which explain what each change does and how to use it.
- A job marked as interruptible now receives
SIGALRMbefore its timeout shuts the worker down (13.34.0). - A job can opt in to counting a worker crash, such as an out-of-memory kill, as one exception toward
maxExceptions(13.34.0; listeners, mailables and notifications in 13.38.0). - The
JobProcessedevent carries the job's duration in milliseconds (13.34.0). queue:work --memoryaccepts a percentage of PHP'smemory_limit(13.35.0).- Unique locks are released in more failure paths, from
Queue::fakeFor()in 13.35.0 to failed scheduled dispatches in 13.38.0.
Timeout Notices for Interruptible Jobs #
Workers already passed signals such as SIGTERM to jobs marked as interruptible. PR #61651 adds the timeout case: when a job is about to time out, the worker passes SIGALRM to the job first, before the job is marked as failed and the worker goes down. The job can use that moment to checkpoint, which the author calls useful for long AI workloads:
public function interrupted(int $signal): void
{
$this->saveProgress($this->progress);
}Only jobs marked as interruptible receive the signal. 13.35.0 adds a test for the SIGALRM path (#61787) and lets long-running scheduled commands see schedule:interrupt (#61764).
Counting Worker Crashes Toward maxExceptions #
A job killed from outside, for example by Kubernetes, or one that crashes with an out-of-memory error or a segfault, never threw an exception, so it did not count toward maxExceptions. PR #61737 describes the result: jobs that rely on maxExceptions with $tries = 0, for example because RateLimited middleware increments attempts, could retry in an endless loop. The fix is opt-in per job, with an attribute or a property:
Note
Opting in: add #[MaxExceptions(3), CountCrashesAsExceptions] to the job class, or set public $countCrashesAsExceptions = true;. The worker then sets a cache marker when it picks up the job and clears it when the attempt ends or just before the timeout handler kills the process. A marker still present on the next run means the previous attempt died, and that counts as one exception.
The PR notes the cost: two extra cache calls per attempt for each opted-in job. 13.38.0 extends CountCrashesAsExceptions to queued listeners, mailables and notifications (#62048).
Job Duration and Percentage Memory Limits #
PR #61672 adds a $duration property, in milliseconds, to the JobProcessed event, so a listener can log {$event->duration}ms without pairing JobProcessing and JobProcessed itself. PR #61753 lets queue:work --memory take a percentage of PHP's memory_limit, as in php artisan queue:work --memory=60%, so the worker limit follows the container's PHP memory setting. The PR states there is no backward-compatibility change and that Laravel Cloud managed queues, which do not accept custom worker options, are unaffected.
Other Queue Changes in These Releases #
13.34.0 also shows an error when queue:restart cannot restart a worker (#61706) and adds a --queue option to queue:flush (#61630). For unique locks, 13.35.0 releases them in Queue::fakeFor() (#61824) and 13.38.0 releases the lock when dispatching a scheduled job fails (#62083); 13.36.0 and 13.37.0, between them, fix locks left behind by failed pushes and rolled-back transactions.
The Sentinel’s Call
Laravel 13 applications with long-running jobs gain the most from these releases: interruptible jobs can now save progress before a timeout, and jobs that crash the worker can be capped through maxExceptions instead of retrying forever. Both need an explicit opt-in. Teams that size worker memory per container can switch --memory to a percentage.
Our judgement, drawn only from the facts and sources above.
Sources
- laravel/framework#61651: [13.x] Notify job when a timeout is going to occur github.com · Sep 22, 2026
- laravel/framework#61753: [13.x] Support percentages for queue:work --memory github.com · Sep 29, 2026
- laravel/framework#61672: [13.x] Include duration in JobProcessed event github.com · Sep 22, 2026
- laravel/framework#61737: [13.x] Allow jobs to count worker crashes towards maxExceptions github.com · Sep 26, 2026
More on PHP and Laravel
2 other articles, newest first
Edited and approved by Jarosław Krzemiński. Spotted a mistake? Report a correction or read the corrections policy.




Comments