What is the timeout for Cloudflare workers?
I want to know about the timeout for the cloudflare workers, how long can they run? For example, vercel serverless function can run upto 5 minutes, so does cloudflare workers have any timeout limits?
3 Replies
Not directly. Workers themselves can run indefinitely, but after 30 seconds, they can be spontaneously evicted under high load/when an update is pushed
There are however CPU Time Limits
Which limit how much processing you can do
Got it 👍
Thanks for the response
So if your worker calls an external API quite a few times to import data where each call takes anywhere from 500ms-2s (large payloads), the worker will hang, evict, or timeout?
I guess even batching can still route your request to the same isolate which will have the same usage?