Skip to content

Commit e0bf74b

Browse files
authored
docs: billing limits and alerts page (#4132)
New `/billing-limits` page covering the full [billing limits feature](https://trigger.dev/changelog/billing-limits) : the three limit options (plan / custom / no limit), billing alerts (% of limit or dollar thresholds), what happens when the limit is reached, the recovery flow, the soft-limits caveat, and the billing limit marker on the Usage page.
1 parent 00ee075 commit e0bf74b

9 files changed

Lines changed: 90 additions & 15 deletions

docs/billing-limits.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: "Billing limits and alerts"
3+
sidebarTitle: "Billing limits & alerts"
4+
description: "Set a monthly compute spend cap for your organization and get email alerts before you reach it."
5+
---
6+
7+
Billing limits let you cap your organization's monthly compute spend so a runaway task or unexpected traffic spike can't blow your budget. Billing alerts notify you by email as you approach thresholds you choose.
8+
9+
<Note>Billing limits and alerts are available to all [Trigger.dev Cloud](https://trigger.dev) organizations. They don't apply to self-hosted instances.</Note>
10+
11+
You can find the settings in the dashboard: open the **Organization** menu in the top left, then **Settings****Billing limits**.
12+
13+
<picture>
14+
<source srcSet="/images/billing-docs.webp" type="image/webp" />
15+
<img src="/images/billing-docs.png" alt="Billing limit settings" />
16+
</picture>
17+
18+
## Setting a billing limit
19+
20+
Choose one of three options:
21+
22+
- **Plan limit**: Use your plan's maximum as the spending cap.
23+
- **Custom limit**: Set your own monthly spend threshold.
24+
- **No limit**: No cap is enforced. This is the default.
25+
26+
A billing limit applies to your whole organization and covers billable environments: `production`, `staging`, and `preview`. Your `dev` environment is not affected.
27+
28+
Optionally, enable **Cancel in-progress runs when this limit is reached** to immediately cancel executing runs when the limit is hit, instead of letting them finish naturally.
29+
30+
## Billing alerts
31+
32+
Billing alerts are email notifications sent when your monthly spend crosses a threshold. You can add multiple thresholds:
33+
34+
- **With a billing limit set**: thresholds are percentages of your limit (e.g. 50%, 80%).
35+
- **Without a billing limit**: thresholds are dollar amounts.
36+
37+
<picture>
38+
<source srcSet="/images/billing-alerts-docs.webp" type="image/webp" />
39+
<img src="/images/billing-alerts-docs.png" alt="Billing alerts settings" />
40+
</picture>
41+
42+
Alerts only notify you — they never pause environments or reject runs. Use them on their own for visibility, or alongside a limit to get advance warning before enforcement kicks in.
43+
44+
## What happens when you reach your limit
45+
46+
When your organization's spend reaches the billing limit, billable environments enter a **grace period**:
47+
48+
1. Queues pause across `production`, `staging`, and `preview`. In-progress runs finish naturally (unless you enabled **Cancel in-progress runs**).
49+
2. New runs can still be triggered and are queued, but they won't start executing. Queued runs incur no compute cost until they start.
50+
3. You have **24 hours** to review and decide what to do.
51+
52+
If you don't act before the grace period ends, queued runs are canceled and new triggers are rejected for the rest of the billing cycle.
53+
54+
<Note>
55+
Billing limits are **soft limits**, not instantaneous hard caps. Usage is evaluated on a short
56+
delay, so spend can briefly exceed your limit before enforcement applies. See our
57+
[terms](https://trigger.dev/terms) for refund policy details.
58+
</Note>
59+
60+
## Resuming after hitting a limit
61+
62+
To resume execution, increase or remove the billing limit from the **Billing limits** page. You'll be asked what to do with the runs that queued up during the pause:
63+
64+
- **Resume queued runs**: everything that built up during the pause runs in order.
65+
- **Cancel queued runs**: the backlog is discarded and only new triggers run going forward.
66+
67+
Execution resumes automatically once you've resolved the limit. Limits also reset at the start of each billing cycle.
68+
69+
## Tracking spend against your limit
70+
71+
On the **Usage** page (Organization menu → **Usage**), a **Billing limit** marker appears on the usage bar alongside your current spend and plan included usage, so you can see how close you are at a glance.
72+
73+
For tips on lowering your spend in the first place, see [How to reduce your spend](/how-to-reduce-your-spend).

docs/docs.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,13 @@
255255
},
256256
{
257257
"group": "Using the Dashboard",
258-
"pages": ["run-tests", "troubleshooting-alerts", "replaying", "bulk-actions"]
258+
"pages": [
259+
"run-tests",
260+
"troubleshooting-alerts",
261+
"billing-limits",
262+
"replaying",
263+
"bulk-actions"
264+
]
259265
},
260266
{
261267
"group": "Troubleshooting",

docs/how-to-reduce-your-spend.mdx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,7 @@ Configure billing limits and alerts in your dashboard to protect against unexpec
2424
- Catch unexpected cost increases early
2525
- Identify runaway tasks before they become expensive
2626

27-
The **Billing limits** settings page has two sections:
28-
29-
- **Billing limit**: Choose your plan limit, a custom amount, or no limit. When a limit is reached, billable environments (`production`, `staging`, and `preview`) enter a **grace period** — queues pause and new runs queue without starting. After grace expires, new triggers are rejected until you increase or remove the limit.
30-
- **Billing alerts**: Add email alerts at specific spend thresholds (% of your limit when a limit is set, or dollar amounts when no limit is configured). Alerts notify you only; they do **not** pause environments or reject triggers.
31-
32-
**Limits vs alerts:** A billing limit enforces spend (grace → reject). Billing alerts are optional notifications at thresholds you choose.
33-
34-
**Soft limits:** Billing limits are not instantaneous hard caps. Usage is evaluated on a short delay, so spend can briefly exceed your limit before enforcement applies. Queued runs during grace incur no compute cost until they start. See our [terms](https://trigger.dev/terms) for refund policy details.
35-
36-
On the **Usage** page, when you have a custom billing limit (or a plan limit that differs from included usage), a **Billing limit** marker appears on the usage bar alongside your current spend and plan included usage.
37-
38-
![Billing limits and alerts settings](./images/billing-alerts-ui.png)
39-
40-
You can open the page from the **Organization** menu in the top left of the dashboard, then **Settings****Billing limits**.
27+
You can open the settings from the **Organization** menu in the top left of the dashboard, then **Settings****Billing limits**. [Read the full billing limits and alerts docs](/billing-limits) for how limits are enforced, the grace period, and resuming after hitting a limit.
4128

4229
## Reduce your machine sizes
4330

89.2 KB
Loading
36.5 KB
Loading

docs/images/billing-docs.png

139 KB
Loading

docs/images/billing-docs.webp

59.9 KB
Loading

docs/limits.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import RateLimitHitUseBatchTrigger from "/snippets/rate-limit-hit-use-batchtrigg
77

88
You can view your current limits, quotas, and rate limit usage in real-time by visiting the **Limits** page in the dashboard (accessible from the left sidebar). This page shows current rate limit token availability, quota usage, and plan features for your organization.
99

10+
<Note>
11+
Looking to cap your monthly spend? That's a setting you control, not a platform limit — see
12+
[Billing limits and alerts](/billing-limits).
13+
</Note>
14+
1015
## Concurrency limits
1116

1217
| Pricing tier | Limit |

docs/troubleshooting.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ If runs are staying in the `QUEUED` state for extended periods, check your concu
242242
- **Review queue concurrency limits** - Check if individual queues have restrictive `concurrencyLimit` settings
243243
- **Check for stuck runs** - See if stalled runs are blocking new executions
244244

245+
### Runs queued because a billing limit was reached
246+
247+
If your organization reaches a billing limit, billable environments (`production`, `staging`, and `preview`) pause: new runs still queue, but they won't start executing until you raise or remove the limit and choose whether to resume or cancel the queued runs. See [Billing limits and alerts](/billing-limits) for the full flow.
248+
245249
### `Crypto is not defined`
246250

247251
This can happen in different situations, for example when using plain strings as idempotency keys. Support for `Crypto` without a special flag was added in Node `v19.0.0`. You will have to upgrade Node - we recommend even-numbered major releases, e.g. `v20` or `v22`. Alternatively, you can switch from plain strings to the `idempotencyKeys.create` SDK function. [Read the guide](/idempotency).

0 commit comments

Comments
 (0)