cd /news/developer-tools/laravel-deadlocks-queue-jobs-that-al… · home › topics › developer-tools › article
[ARTICLE · art-166276] src=freek.dev ↗ pub= topic=developer-tools verified=true sentiment=· neutral

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

Laravel queue workers on MySQL versions below 8.0.1 — or on servers where Laravel misreads the database version — reserve jobs using a plain FOR UPDATE lock and can deadlock on the DELETE, leaving jobs that already ran in the failed_jobs table. A single tinker line reveals which locking mechanism a given installation uses. The finding matters for developers running Laravel queues on older MySQL, who can check their lock type before deadlocks cause duplicate job failures.

by read1 min views3 publishedOct 26, 2026
Laravel Deadlocks: Queue Jobs That Already Ran End Up in failed_jobs
Image: Freek (auto-discovered)

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.

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."

── more in #developer-tools 4 stories · sorted by recency
── more on @laravel 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/laravel-deadlocks-qu…] indexed:0 read:1min 2026-10-26 · —