Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Laravel Queues and Horizon Setup and Debugging

    by Saizul Amin

    1

    Audit Laravel Horizon and Supervisor configs to fix duplicate jobs and triage failed_jobs table by root cause.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Laravel Queues and Horizon Setup and Debugging

    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

    1. Fix the highest-severity items first.
    2. Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
    3. 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 --timeout flags, retry_after settings, and Supervisor stopwaitsecs are 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:retry or queue:forget based on the specific root cause of the failure.
    • Validate Horizon config including tries, trim, and viewHorizon gate settings for production safety.
    • Review Supervisor setups to ensure autorestart and stopwaitsecs prevent jobs from being killed mid-execution during deploys.

    How it works

    1. Analyze configuration using scripts/queue_config_check.py against your project files and /etc/supervisor/conf.d/ configs.
    2. Import job data by exporting the failed_jobs table to a TSV or JSON file for local triage analysis.
    3. Categorize failures using the triage script to group jobs by class and exception, identifying "safe to retry" vs "must forget" scenarios.
    4. Apply fixes by updating PHP class properties like $backoff or $deleteWhenMissingModels and 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_jobs table 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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.

    Frequently Asked Questions

    This skill solves 'silent failures' and duplicate executions by auditing the complex timing relationships between job timeouts, Redis visibility, and Supervisor signals that generic advice often overlooks.

    The skill supports Laravel versions 9 through 12, Laravel Horizon 5, and standard Supervisor setups using Redis or relational database queue drivers. It is not currently compatible with Laravel Vapor or SQS-specific visibility timeout logic.

    You will receive a structured diagnostic workflow, Python-based configuration audit scripts, and a specialized triage utility for processing exported failed_jobs data.

    No, this skill operates on configuration files and database exports (TSV/JSON) to maintain security; it does not require direct SSH or database access to your production environment.

    It is ideal for high-volume environments where manually parsing thousands of stack traces is impractical and for developers setting up new production infrastructure who need to ensure worker resilience during deployments.

    The skill includes a categorization engine that groups failures by root cause, allowing you to generate bulk 'queue:retry' commands for transient issues (like API timeouts) while ignoring permanent failures.

    New in APIs & Backend