Skip to content

$ cat laravel-deadlocks-queue-jobs-that-already-ran-end-up-in-failed-jobs.md

Laravel Deadlocks: Queue Jobs That Already Ran End Up in failed_jobs

Explains why Laravel queue jobs that already ran can end up in the failed_jobs table on older MySQL versions, or when Laravel misdetects the server. The cause is a plain FOR UPDATE lock reservation that can deadlock on the DELETE step. A single tinker command reveals which locking method your setup uses.

freek.dev26 Oct 2026 · 1 min read · summary
Read on freek.dev ↗
Below MySQL 8.0.1, or on a server Laravel misreads, workers reserve jobs with a plain FOR UPDATE and can deadlock on the DELETE. One tinker line shows which lock yours use. Read more

source

This is a summary of an article first published by freek.dev. The full piece is on their site.

Open original