Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jcosta's avatar

Job with WithoutOverlapping never starts after one fail

I recently had an issue with one Job that has the middleware WithoutOverlapping where after one fail, the job never starts again.

I tried using releaseAfter and expireAfter and it doesn't work. It is always failing with this message:

Illuminate\Queue\MaxAttemptsExceededException: App\Jobs\TestJob has been attempted too many times or run too long. The job may have previously timed out. in {my-path}/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:750

I notice that if I remove the WithoutOverlapping it works. Any idea what is causing this?

I'm using Laravel 8, PHP 8.1

0 likes
1 reply
f0rtis's avatar

When using WithoutOverlapping, you have to use InteractsWithQueue trait for your job/listener, otherwise it'll fail if the lock has been acquired by another job/listener.

Please or to participate in this conversation.