Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/assets/images/durable-objects/lifecycle-of-a-do.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Assuming a Durable Object does not run, the first incoming request or event (lik

At this point the Durable Object is in the **active in-memory state**.

If it continuously receives requests or events within 10 seconds of each other, the Durable Object will remain in this state.
If it continuously receives requests or events within 10 seconds (the hibernation grace period) of each other, the Durable Object will remain in this state.

After 10 seconds of no incoming request or events, the runtime can now hibernate the Durable Object. Hibernation will only occur if **all** of the below are true:
- No `setTimeout`/`setInterval` scheduled callbacks are set.
Expand All @@ -74,4 +74,4 @@ Objects in the **hibernated** state keep their Websocket clients connected, and

The next incoming request or event starts the cycle again.

As explained in [When does a Durable Object incur duration charges?](/durable-objects/platform/pricing/#when-does-a-durable-object-incur-duration-charges), a Durable Object incurs charges only when it is **actively running in-memory**, or when it is **idle in-memory and non-hibernateable**.
As explained in [When does a Durable Object incur duration charges?](/durable-objects/platform/pricing/#when-does-a-durable-object-incur-duration-charges), a Durable Object incurs charges as long as the JavaScript object is held in memory.
Loading