3 ms·
There's no time limit on requests, as long as the client is still connected. However, two things you might be thinking of: * If you use waitUntil() to schedule
by kentonv 5y ago
There's no time limit on requests, as long as the client is still connected. However, two things you might be thinking of:
* If you use waitUntil() to schedule async work that completes after the HTTP response has been sent, this work is limited to 30 seconds.
* In general, if a request runs longer than 30 seconds, the chance of random cancellation increases a lot. For example, when we upgrade the Workers Runtime to a new version, we will give in-flight requests 30 seconds to finish before the process exits, which will cancel all remaining requests. (Of course, any application that relies on long-running connections needs to handle random disconnects regardless, due to the general unreliability of networks.)
- ignoramous 5y agoThanks kentonv and vlovich123. I stand corrected. I've been using Workers since 2019 and quite haven't kept up with Cloudflare's pace of innovation ever since. It has been dizzying. Looking forward to handling TCP and WebRTC workloads (announced last year) with Workers next.