Skip to content

Cloudflare Workers runtime updates get a 20-minute grace period

In-flight requests and WebSocket connections used to get 30 seconds to finish when the Workers runtime updated. Now they get up to 20 minutes.

Source: Cloudflare

Cloudflare extended the grace period Workers get to finish in-flight work during a runtime update, from 30 seconds to 20 minutes, as of 12 October.

When Cloudflare rolls out a new version of the Workers runtime, new requests get routed to the updated version while the old one drains whatever it is still handling. That drain window used to be 30 seconds, long enough to cut off a slow request, a streamed response, or a live WebSocket session mid-flight. It is now up to 20 minutes, though a connection caught partway through an update already in progress only gets whatever time is left, and new requests do not reset the clock.

Cloudflare’s own notes are blunt about the limit: WebSockets, including ones using the Hibernation API, can still disconnect before the grace period ends. You still need to handle reconnection, safe retries, and state recovery after a restart.

Why it matters: if you run long HTTP requests, streamed AI responses, or WebSocket sessions on Workers, a runtime update used to carry a real risk of cutting a response off mid-way. Twenty minutes covers most of that work, but it is a longer leash, not a guarantee, so keep the reconnect and retry logic you should already have.

Share

Related reading

More from The Wire

All briefs