Developer Platform von Cloudflare
Workers: Mehr Zeit für laufende Anfragen bei Runtime-Updates
Bei Updates der Workers-Runtime haben laufende Anfragen und Verbindungen nun eine Gnadenfrist von bis zu 20 Minuten statt bisher 30 Sekunden, bevor sie beendet werden.
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.
Workers runtime versions: existing work drains on the previous version; new HTTP requests use the updated version
New incoming HTTP requests go to the updated version of the Workers runtime once it is ready. Processes running the previous version stop accepting these requests and drain existing work. The grace period applies to each process running the previous version. When it ends, unfinished requests and open connections on that process 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.