Catalog / Cloudflare Developer Platform
Workers - More time for requests to finish during Workers runtime updates
Pending requests and connections to Workers now have a grace period of up to 20 minutes during Workers runtime updates. Previously, the grace period was up to 30 seconds.
This gives long-running HTTP requests, streamed AI responses, and live WebSocket sessions more time to continue before an update interrupts them.
Requests affected by an update already underway may have less than 20 minutes remaining. New requests do not extend the grace period. When it ends, any unfinished requests and open connections are terminated.
You should design your application to reconnect WebSockets, safely retry interrupted requests, and recover saved state after a restart. WebSockets can disconnect before the grace period ends, including connections using the WebSocket Hibernation API.
For more information, refer to Workers runtime updates.