- Home
- Skills
- APIs & Backend
- Laravel Queues and Horizon Setup and Debugging
Works with the AI Agents you already use
Laravel Queues and Horizon Setup and Debugging
by Saizul Amin
Audit Laravel Horizon and Supervisor configs to fix duplicate jobs and triage failed_jobs table by root cause.
$7
Laravel Queues and Horizon Setup and Debugging
Example session with this skill installed
Run the Laravel Queues and Horizon Setup and Debugging skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the laravel queues
Here is what the Laravel Queues and Horizon Setup and Debugging skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
5 failed job(s) in 2 group(s)
#1 4x App\Jobs\GenerateReport [timeout]
MaxAttemptsExceededException: App\Jobs\GenerateReport has been attempted too many times.
queues: redis:default
between 2026-11-20 10:00:00 and 2026-11-23 10:00:00
advice: Job ran longer than retry_after or kept being released. Check that the worker --timeout is below retry_after, raise $timeout for this job, or make it faster / chunked.
#2 1x App\Jobs\SendInvoice [missing-model]
ModelNotFoundException: No query results for model [App\Models\Invoice] <n>
queues: redis:emails
between 2026-11-22 09:00:00 and 2026-11-22 09:00:00
advice: The model was deleted before the job ran. Set public $deleteWhenMissingModels = true if that is expected; do not retry.
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Laravel queue issues often manifest as silent failures, duplicate job executions, or bloated Redis memory. This skill provides a structured diagnostic workflow to audit your worker configuration and triage the failed_jobs table without manually parsing thousands of stack traces.
What it does
- Audit timeout chains by verifying that job timeouts, worker
--timeoutflags,retry_aftersettings, and Supervisorstopwaitsecsare correctly sequenced. - Triage failed jobs by grouping thousands of failures into actionable categories like missing models, deadlocks, and external API timeouts.
- Generate fix commands for
queue:retryorqueue:forgetbased on the specific root cause of the failure. - Validate Horizon config including
tries,trim, andviewHorizongate settings for production safety. - Review Supervisor setups to ensure
autorestartandstopwaitsecsprevent jobs from being killed mid-execution during deploys.
How it works
- Analyze configuration using
scripts/queue_config_check.pyagainst your project files and/etc/supervisor/conf.d/configs. - Import job data by exporting the
failed_jobstable to a TSV or JSON file for local triage analysis. - Categorize failures using the triage script to group jobs by class and exception, identifying "safe to retry" vs "must forget" scenarios.
- Apply fixes by updating PHP class properties like
$backoffor$deleteWhenMissingModelsand generating the necessary CLI commands.
Frameworks & tools
Laravel 9 through 12, Laravel Horizon 5, Supervisor, Redis, and MySQL/PostgreSQL.
Why this beats prompting it yourself
Standard LLMs often miss the nuanced race condition where retry_after triggers a second worker before the first one times out. This skill uses dedicated Python scripts to parse your actual configuration files and database exports, providing deterministic advice rather than general Laravel best practices.
Use cases
- Debugging why specific jobs are running twice or triggering
MaxAttemptsExceededException. - Resolving "job stuck in pending" issues after a server migration or deployment.
- Cleaning up a
failed_jobstable with thousands of entries after an external API outage. - Configuring a new production server to ensure workers survive deploys and handle signals correctly.
Known limitations
Does not support Laravel Vapor or SQS-only visibility timeout logic. Does not profile slow PHP code execution itself. Requires manual export of the failed_jobs table to a file.
Open source: saizul/laravel-php-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.
No support for Laravel Vapor or SQS visibility timeouts. Requires manual DB export to TSV/JSON for triage. Does not profile PHP code performance.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Python 3.8+