Skip to content

Commit ea907cf

Browse files
committed
docs(queues): Cover new queue limits and TTL system
1 parent e536d35 commit ea907cf

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

docs/limits.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,21 @@ You can request a higher rate limit from us if you're on a paid plan.
3131

3232
## Queued tasks
3333

34-
The number of queued tasks by environment.
34+
The maximum number of runs that can be queued **per queue** (not across all queues in the environment). Each queue can hold up to its limit independently. When a queue hits its limit, new triggers to that queue are rejected.
3535

36-
| Limit | Details |
37-
| :------ | :----------------- |
38-
| Dev | At most 500 |
39-
| Staging | At most 10 million |
40-
| Prod | At most 10 million |
36+
<Note>
37+
The limits below apply to [Trigger.dev Cloud](https://trigger.dev). If you self-host Trigger.dev, queue size limits are configurable via the `MAXIMUM_DEV_QUEUE_SIZE` and `MAXIMUM_DEPLOYED_QUEUE_SIZE` environment variables — see [Self-hosting environment variables](/self-hosting/env/webapp#run-engine).
38+
</Note>
39+
40+
| Pricing tier | Development (per queue) | Staging / Production (per queue) |
41+
| :----------- | :---------------------- | :-------------------------------- |
42+
| Free | 500 | 10,000 |
43+
| Hobby | 500 | 250,000 |
44+
| Pro | 5,000 | 1,000,000 |
45+
46+
## Maximum run TTL
47+
48+
On Trigger.dev Cloud, all runs have an enforced maximum TTL of 14 days. Runs without an explicit TTL automatically receive the 14-day TTL; runs with a TTL longer than 14 days are clamped to 14 days. This prevents queued runs from accumulating indefinitely. If you self-host, you can configure a maximum TTL via the `RUN_ENGINE_DEFAULT_MAX_TTL` environment variable — see [Self-hosting environment variables](/self-hosting/env/webapp#run-engine).
4149

4250
## Schedules
4351

docs/runs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ await yourTask.trigger({ foo: "bar" }, { ttl: "10m" });
161161

162162
If the run hasn't started within the specified TTL, it will automatically expire, returning the status `Expired`. This is useful for time-sensitive tasks where immediate execution is important. For example, when you queue many runs simultaneously and exceed your concurrency limits, some runs might be delayed - using TTL ensures they only execute if they can start within your specified timeframe.
163163

164-
Note that dev runs automatically have a 10-minute TTL. In Staging and Production environments, no TTL is set by default.
164+
Dev runs automatically have a 10-minute TTL. On Trigger.dev Cloud, staging and production runs have a maximum TTL of 14 days applied automatically (runs without an explicit TTL get 14 days; longer TTLs are clamped). See [Limits — Maximum run TTL](/limits#maximum-run-ttl) for details.
165165

166166
![Run with TTL](/images/run-with-ttl.png)
167167

docs/self-hosting/env/webapp.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ mode: "wide"
136136
| `RUN_ENGINE_RATE_LIMIT_REQUEST_LOGS_ENABLED` | No | 0 | Run engine rate limit request logs. |
137137
| `RUN_ENGINE_RATE_LIMIT_REJECTION_LOGS_ENABLED` | No | 1 | Run engine rate limit rejection logs. |
138138
| `RUN_ENGINE_RATE_LIMIT_LIMITER_LOGS_ENABLED` | No | 0 | Run engine rate limit limiter logs. |
139+
| `RUN_ENGINE_DEFAULT_MAX_TTL` | No || Maximum TTL for all runs (e.g. "14d"). Runs without a TTL use this as default; runs with a larger TTL are clamped. |
140+
| `MAXIMUM_DEV_QUEUE_SIZE` | No || Maximum queued runs per queue in development environments. |
141+
| `MAXIMUM_DEPLOYED_QUEUE_SIZE` | No || Maximum queued runs per queue in deployed (staging/prod) environments. |
139142
| **Misc** | | | |
140143
| `TRIGGER_TELEMETRY_DISABLED` | No || Disable telemetry. |
141144
| `NODE_MAX_OLD_SPACE_SIZE` | No | 8192 | Maximum memory allocation for Node.js heap in MiB (e.g. "4096" for 4GB). |

docs/triggering.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,10 @@ The timeline would look like this:
780780

781781
For this reason, the `ttl` option only accepts durations and not absolute timestamps.
782782

783+
<Note>
784+
On [Trigger.dev Cloud](https://trigger.dev), there is a maximum TTL of 14 days. If you don't specify a TTL in staging or production, runs automatically get a 14-day TTL. If you specify a TTL longer than 14 days, it is clamped to 14 days. See [Limits — Maximum run TTL](/limits#maximum-run-ttl) for details.
785+
</Note>
786+
783787
### `idempotencyKey`
784788

785789
You can provide an `idempotencyKey` to ensure that a task is only triggered once with the same key. This is useful if you are triggering a task within another task that might be retried:

0 commit comments

Comments
 (0)