|
1 | 1 | --- |
2 | 2 | name: configuring-horizon |
3 | | -description: "Configures Laravel Horizon for Redis queue management. Triggered when a user mentions Horizon installation, queue supervisor setup, worker configuration, dashboard authorization, auto-scaling, job monitoring, metrics, tags, or notifications. Also applies when troubleshooting blank metrics, LongWaitDetected alerts, or misconfigured worker processes, even when Horizon is not named explicitly — applies to any request about queue workers backed by Redis with a monitoring dashboard, or monitoring Laravel jobs." |
| 3 | +description: "Configures Laravel Horizon for Redis queue management. Triggered when a user mentions Horizon installation, queue supervisor setup, worker configuration, dashboard authorization, auto-scaling, job monitoring, metrics, tags, or notifications. Also applies when troubleshooting blank metrics, LongWaitDetected alerts, or misconfigured worker processes, even when Horizon is not named explicitly. Applies to any request about queue workers backed by Redis with a monitoring dashboard, or monitoring Laravel jobs." |
4 | 4 | license: MIT |
5 | 5 | metadata: |
6 | 6 | author: laravel |
|
23 | 23 |
|
24 | 24 | ## Documentation |
25 | 25 |
|
26 | | -Use `search-docs` for detailed Horizon patterns and documentation (configuration, supervisors, balancing, dashboard auth, tags, notifications, metrics, deployment). |
| 26 | +Use `search-docs` for detailed Horizon patterns and documentation covering configuration, supervisors, balancing, dashboard authorization, tags, notifications, metrics, and deployment. |
27 | 27 |
|
28 | 28 | For deeper guidance on specific topics, read the relevant reference file before implementing: |
29 | 29 |
|
30 | | -- `references/supervisors.md` — supervisor blocks, balancing strategies, multi-queue setups, auto-scaling |
31 | | -- `references/notifications.md` — LongWaitDetected alerts, failed job notifications, `waits` config |
32 | | -- `references/tags.md` — job tagging, dashboard filtering, silencing noisy jobs |
33 | | -- `references/metrics.md` — blank metrics dashboard, snapshot scheduling, retention config |
| 30 | +- `references/supervisors.md` covers supervisor blocks, balancing strategies, multi-queue setups, and auto-scaling |
| 31 | +- `references/notifications.md` covers LongWaitDetected alerts, failed job notifications, and the `waits` config |
| 32 | +- `references/tags.md` covers job tagging, dashboard filtering, and silencing noisy jobs |
| 33 | +- `references/metrics.md` covers the blank metrics dashboard, snapshot scheduling, and retention config |
34 | 34 |
|
35 | 35 | ## Basic Usage |
36 | 36 |
|
|
42 | 42 |
|
43 | 43 | ### Supervisor Configuration |
44 | 44 |
|
45 | | -Define supervisors in `config/horizon.php`. The `environments` array merges into `defaults` — it does not replace the whole supervisor block: |
| 45 | +Define supervisors in `config/horizon.php`. The `environments` array merges into `defaults` and does not replace the whole supervisor block: |
46 | 46 |
|
47 | 47 | @boostsnippet("Supervisor Config", "php") |
48 | 48 | 'defaults' => [ |
@@ -87,10 +87,10 @@ protected function gate(): void |
87 | 87 |
|
88 | 88 | ## Common Pitfalls |
89 | 89 |
|
90 | | -- Horizon only works with the Redis queue driver — other drivers (database, SQS, etc.) are not supported |
91 | | -- Redis Cluster is not supported — Horizon requires a standalone Redis connection |
92 | | -- Always check `config/horizon.php` to understand the current supervisor and environment configuration before making changes |
93 | | -- `environments` overrides only the keys you specify; it merges into `defaults`, it does not replace |
94 | | -- Timeout chain must be ordered: `retry_after` < job `timeout` < supervisor `timeout`. Wrong order causes jobs to be force-killed and re-queued indefinitely |
95 | | -- Metrics dashboard stays blank until `horizon:snapshot` is scheduled — `php artisan horizon` alone does not populate metrics |
96 | | -- Not using `search-docs` for the latest Horizon documentation |
| 90 | +- Horizon only works with the Redis queue driver. Other drivers such as database and SQS are not supported. |
| 91 | +- Redis Cluster is not supported. Horizon requires a standalone Redis connection. |
| 92 | +- Always check `config/horizon.php` before making changes to understand the current supervisor and environment configuration. |
| 93 | +- The `environments` array overrides only the keys you specify. It merges into `defaults` and does not replace it. |
| 94 | +- The timeout chain must be ordered: `retry_after` less than job `timeout` less than supervisor `timeout`. The wrong order causes jobs to be force-killed and re-queued indefinitely. |
| 95 | +- The metrics dashboard stays blank until `horizon:snapshot` is scheduled. Running `php artisan horizon` alone does not populate metrics. |
| 96 | +- Always use `search-docs` for the latest Horizon documentation rather than relying on this skill alone. |
0 commit comments