Vercel Functions รันได้ 30 นาที: สิ่งที่ต้องตัดสินใจก่อนย้ายงาน AI ยาวไป serverless
เมื่อวันที่ 15 มิถุนายน 2026 Vercel ประกาศว่า Functions บน Node.js และ Python สามารถรันได้สูงสุด 30 นาทีสำหรับทีม Pro และ Enterprise โดย duration ที่เกิน 800 วินาทียังเป็น beta และต้องใช้ Fluid Compute เหมาะกับ LLM streaming, OCR, extraction, media processing และ automation ที่มีขอบเขตชัดเจน
สิ่งที่เปลี่ยน
เมื่อวันที่ 15 มิถุนายน 2026 Vercel ประกาศว่า Functions บน Node.js และ Python สามารถรันได้สูงสุด 30 นาทีสำหรับทีม Pro และ Enterprise โดย duration ที่เกิน 800 วินาทียังเป็น beta และต้องใช้ Fluid Compute เหมาะกับ LLM streaming, OCR, extraction, media processing และ automation ที่มีขอบเขตชัดเจน
หลักการเลือกยังเหมือนเดิม: ถ้าผู้ใช้กำลังรอผลลัพธ์ Function ยาวพร้อม streaming อาจเหมาะ ถ้างานต้อง resume หลังล้มเหลว retry เป็นขั้น หรือ sleep นาน ควรใช้ Workflow หรือ Queue ถ้าต้องมีไฟล์ browser session หรือ workspace ของ agent ให้ใช้ Sandbox
การตัดสินใจเชิงปฏิบัติ
| Runtime | Best fit | Watch out |
|---|---|---|
| Function | User waits, streaming matters, bounded input | Needs explicit maxDuration, cancellation, logs |
| Workflow / Queue | Retry, checkpoint, durable steps | Requires idempotency and state design |
| Sandbox | Browser, filesystem, tests, agent workspace | Needs permission and cleanup rules |
• Verify plan, runtime, beta availability and Fluid Compute settings.
• Keep provider and database timeouts below the function maximum.
• Add progress logs, correlation ids, cancellation and cost alerts.
• Use idempotency keys before moving mutations into longer requests.
ความเสี่ยง
ก่อน deploy ให้ตรวจ plan, runtime, beta availability, maxDuration, timeout ของ provider/DB, progress log, cancel, rate limit และ cost alert timeout ที่ยาวขึ้นไม่ใช่ durable state machine
Community discussions around Vercel timeouts show that developers have long been balancing streaming, queues and separate workers for LLM and long API work. Treat those discussions as product signal, while relying on the official Vercel changelog and docs for the actual limits.
แหล่งข้อมูล
- Vercel Changelog: Functions can now run up to 30 minutes
- Vercel Docs: Configuring Maximum Duration
- Vercel Docs: Fluid Compute
- Vercel Docs: Functions usage and pricing
- Vercel Changelog: Workflow SDK supports TanStack Start
- Vercel Changelog: Sandbox can run up to 24 hours
- Reddit: long-running task questions on Vercel
- Reddit: Vercel runtime limit discussion for LLM apps