Cloud//timeout

The maximum time a serverless function is allowed to run before the platform kills it. If the function hasn't responded by then, it dies — no graceful shutdown, no retry.


The maximum time a serverless function is allowed to run before the platform kills it. If the function hasn't responded by then, it dies — no graceful shutdown, no retry.

Vercel Functions: 10s (Hobby), 60s (Pro), 300s (Enterprise)

Cloudflare Workers: tied to CPU time, not wall time — 10ms (free), 30s (paid), 5min max

AWS Lambda: up to 15 minutes

The timeout is why you can't run heavy batch processing (e.g. scanning thousands of emails) in a single serverless function — it'll get killed mid-work

Solution: job queues like Inngest or Trigger.dev that break work into small chunks, each within the timeout. Or Vercel Cron Jobs for recurring scheduled work.

Timeouts exist because serverless platforms bill per execution time and share resources — letting one function run forever would starve others and rack up costs