Skip to content

Commit a307b82

Browse files
committed
Implementing feedback.
1 parent 02f480d commit a307b82

File tree

4 files changed

+36
-38
lines changed

4 files changed

+36
-38
lines changed

src/content/docs/durable-objects/platform/limits.mdx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,6 @@ For Durable Object classes with [SQLite storage](/durable-objects/api/storage-ap
8383

8484
<Render file="limits_increase" product="workers" />
8585

86-
## Increasing Durable Object CPU limits
87-
88-
Durable Objects are Worker scripts, and have 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, which don't count towards your CPU time or Durable Objects compute consumption.
89-
90-
By default, the maximum CPU time per Durable Objects invocation (HTTP request, WebSocket message, or Alarm) is set to 30 seconds, but can be increased for all Durable Objects associated with a Durable Object definition by setting `limits.cpu_ms` in your Wrangler configuration:
91-
92-
<WranglerConfig>
93-
94-
```jsonc
95-
{
96-
// ...rest of your configuration...
97-
"limits": {
98-
"cpu_ms": 300000, // 300,000 milliseconds = 5 minutes
99-
},
100-
// ...rest of your configuration...
101-
}
102-
```
103-
104-
</WranglerConfig>
105-
10686
## Frequently asked questions
10787

10888
<Render file="do-faq-limits" product="durable-objects"/>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: FAQs
2+
title: Frequently Asked Questions
33
pcx_content_type: concept
44
sidebar:
55
order: 12
@@ -8,11 +8,11 @@ sidebar:
88

99
import { Render } from "~/components";
1010

11-
## Pricing FAQs
11+
## Pricing
1212

1313
<Render file="do-faq-pricing" product="durable-objects"/>
1414

15-
## Limits FAQs
15+
## Limits
1616

1717
<Render file="do-faq-limits" product="durable-objects"/>
1818

src/content/partials/durable-objects/do-faq-limits.mdx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{}
33
---
44

5-
import {GlossaryTooltip} from "~/components";
5+
import {GlossaryTooltip, WranglerConfig} from "~/components";
66

77
### How much work can a single Durable Object do?
88

@@ -19,5 +19,25 @@ A Durable Object that receives too many requests will, after attempting to queue
1919
Durable Objects are designed such that the number of individual objects in the system do not need to be limited, and can scale horizontally.
2020

2121
- You can create and run as many separate Durable Objects as you want within a given Durable Object <GlossaryTooltip term="namespace">namespace</GlossaryTooltip>.
22-
- The main limit to your usage of Durable Objects is the total storage limit per account.
23-
- If you need more storage, contact your account team or complete the [Limit Increase Request Form](https://forms.gle/ukpeZVLWLnKeixDu7) and we will contact you with next steps.
22+
- There are no limits for storage per account when using SQLite-backed Durable Objects on a Workers Paid plan.
23+
- Each SQLite-backed Durable Object has a storage limit of 10 GB on a Workers Paid plan.
24+
25+
### Can I increase Durable Objects' CPU limit?
26+
27+
Durable Objects are Worker scripts, and have 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, which don't count towards your CPU time or Durable Objects compute consumption.
28+
29+
By default, the maximum CPU time per Durable Objects invocation (HTTP request, WebSocket message, or Alarm) is set to 30 seconds, but can be increased for all Durable Objects associated with a Durable Object definition by setting `limits.cpu_ms` in your Wrangler configuration:
30+
31+
<WranglerConfig>
32+
33+
```jsonc
34+
{
35+
// ...rest of your configuration...
36+
"limits": {
37+
"cpu_ms": 300000, // 300,000 milliseconds = 5 minutes
38+
},
39+
// ...rest of your configuration...
40+
}
41+
```
42+
43+
</WranglerConfig>

src/content/partials/durable-objects/do-faq-pricing.mdx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
{}
33
---
44

5-
### Does an empty table / SQLite database contribute to my storage?
6-
7-
Yes, although minimal. Empty tables can consume at least a few kilobytes, based on the number of columns (table width) in the table. An empty SQLite database consumes approximately 12 KB of storage.
8-
9-
### Does metadata stored in Durable Objects count towards my storage?
10-
11-
All writes to a SQLite-backed Durable Object stores nominal amounts of metadata in internal tables in the Durable Object, which counts towards your billable storage.
12-
13-
The metadata remains in the Durable Object until you call [`deleteAll()`](/durable-objects/api/storage-api/#deleteall).
14-
155
### When does a Durable Object incur duration charges?
166

177
A Durable Object incurs duration charges as long as the JavaScript object is held in memory. Once an object has been evicted from memory, the next time it is needed, it will be recreated (calling the constructor again). There are two factors which decide when an object may be evicted from memory: hibernatability and existence of clients.
@@ -26,8 +16,16 @@ A Durable Object is considered hibernatable any time that it is not waiting for
2616

2717
- As an exception, a WebSocket request which has explicitly been accepted using the [WebSocket hibernation API](/durable-objects/best-practices/websockets/#websocket-hibernation-api) allows a Durable Object to hibernate even while the WebSocket is still connected.
2818

29-
30-
3119
Once a Durable Object has been in a hibernatable state for 10 consecutive seconds, it hibernates, and duration billing stops.
3220

3321
Even if a Durable Object never becomes hibernatable, it will still be evicted once all clients have gone away. A Durable Object is considered to have clients if any other Worker currently holds a stub pointing to the Durable Object, or is waiting for a response from the Durable Object. An incoming WebSocket connection counts as a client. If the object is currently responding to an alarm event, this also counts as having a client. When not hibernatable, a Durable Object will be evicted from memory after it has had no client for 70-140 seconds (the exact interval varies). But again, if the object is hibernatable, then the 10-second hibernation timeout takes precedence and the 70-140 second no-client timeout is moot.
22+
23+
### Does an empty table / SQLite database contribute to my storage?
24+
25+
Yes, although minimal. Empty tables can consume at least a few kilobytes, based on the number of columns (table width) in the table. An empty SQLite database consumes approximately 12 KB of storage.
26+
27+
### Does metadata stored in Durable Objects count towards my storage?
28+
29+
All writes to a SQLite-backed Durable Object stores nominal amounts of metadata in internal tables in the Durable Object, which counts towards your billable storage.
30+
31+
The metadata remains in the Durable Object until you call [`deleteAll()`](/durable-objects/api/storage-api/#deleteall).

0 commit comments

Comments
 (0)