high severityVercel Edge Functions

504 Gateway Timeout error with code INTERNAL_EDGE_FUNCTION_INVOCATION_TIMEOUT or FUNCTION_INVOCATION_TIMEOUT in Vercel logs; function hangs or fails after ~25s without response; works locally but fails in production.

Root cause

Vercel Edge Runtime enforces a 25-second limit to begin sending responses to enable low-latency edge computing and prevent resource abuse; total execution (streaming + waitUntil) capped at 300s since March 2025 rollout to ensure predictability (previously unbounded).

verceledge-functionstimeout504INTERNAL_EDGE_FUNCTION_INVOCATION_TIMEOUTFUNCTION_INVOCATION_TIMEOUTedge-runtime

Citations