Skip to content

Commit be66ee1

Browse files
maheshwaripOxyjun
andauthored
Updated queues consumer cpu limits (cloudflare#21141)
* Updated queues consumer cpu limits * Updated typos in limits * Fixed typo * Update src/content/docs/queues/platform/limits.mdx --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 4e46bda commit be66ee1

File tree

1 file changed

+39
-18
lines changed

1 file changed

+39
-18
lines changed

src/content/docs/queues/platform/limits.mdx

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ sidebar:
66

77
---
88

9-
import { Render } from "~/components"
9+
import { Render, WranglerConfig } from "~/components"
1010

1111

12-
| Feature | Limit |
13-
| --------------------------------------------- | ------------------------------------------------------------- |
14-
| Queues | 10,000 per account |
15-
| Message size | 128 KB <sup>1</sup> |
16-
| Message retries | 100 |
17-
| Maximum consumer batch size | 100 messages |
18-
| Maximum messages per `sendBatch` call | 100 (or 256KB in total) |
19-
| Maximum Batch wait time | 60 seconds |
20-
| Per-queue message throughput | 5,000 messages per second <sup>2</sup> |
21-
| Message retention period <sup>3</sup> | 14 days |
22-
| Per-queue backlog size <sup>4</sup> | 25GB |
23-
| Concurrent consumer invocations | 250 <sup>push-based only</sup> |
24-
| Consumer duration (wall clock time) | 15 minutes <sup>5</sup> |
25-
| Consumer CPU time | 30 seconds |
26-
| `visibilityTimeout` (pull-based queues) | 12 hours |
27-
| `delaySeconds` (when sending or retrying) | 12 hours |
28-
| Requests to the Queues API (incl. pulls/acks) | [1200 requests / 5 mins](/fundamentals/api/reference/limits/) |
12+
| Feature | Limit |
13+
| ----------------------------------------------------------------| ------------------------------------------------------------- |
14+
| Queues | 10,000 per account |
15+
| Message size | 128 KB <sup>1</sup> |
16+
| Message retries | 100 |
17+
| Maximum consumer batch size | 100 messages |
18+
| Maximum messages per `sendBatch` call | 100 (or 256KB in total) |
19+
| Maximum Batch wait time | 60 seconds |
20+
| Per-queue message throughput | 5,000 messages per second <sup>2</sup> |
21+
| Message retention period <sup>3</sup> | 14 days |
22+
| Per-queue backlog size <sup>4</sup> | 25GB |
23+
| Concurrent consumer invocations | 250 <sup>push-based only</sup> |
24+
| Consumer duration (wall clock time) | 15 minutes <sup>5</sup> |
25+
| [Consumer CPU time](/workers/platform/limits/#cpu-time)| 30 seconds (default). [Configurable to 5 minutes](/queues/platform/limits/#increasing-queue-consumer-worker-cpu-limits) |
26+
| `visibilityTimeout` (pull-based queues) | 12 hours |
27+
| `delaySeconds` (when sending or retrying) | 12 hours |
28+
| Requests to the Queues API (incl. pulls/acks) | [1200 requests / 5 mins](/fundamentals/api/reference/limits/) |
2929

3030

3131

@@ -40,3 +40,24 @@ import { Render } from "~/components"
4040
<sup>5</sup> Refer to [Workers limits](/workers/platform/limits/#cpu-time).
4141

4242
<Render file="limits_increase" product="workers" />
43+
44+
### Increasing Queue Consumer Worker CPU Limits
45+
[Queue consumer Workers](/queues/reference/how-queues-works/#consumers) are Worker scripts, and share the same [per invocation CPU limits](/workers/platform/limits/#worker-limits) as any Workers do. Note that CPU time is active processing time: not time spent waiting on network requests, storage calls, or other general I/O.
46+
47+
By default, the maximum CPU time per consumer Worker invocation is set to 30 seconds, but can be increased by setting `limits.cpu_ms` in your Wrangler configuration:
48+
49+
<WranglerConfig>
50+
51+
```jsonc
52+
{
53+
// ...rest of your configuration...
54+
"limits": {
55+
"cpu_ms": 300000, // 300,000 milliseconds = 5 minutes
56+
},
57+
// ...rest of your configuration...
58+
}
59+
```
60+
61+
</WranglerConfig>
62+
63+
To learn more about CPU time and limits, [review the Workers documentation](/workers/platform/limits/#cpu-time).

0 commit comments

Comments
 (0)