Vercel · infra · fg-0248

Vercel Function returns 504 FUNCTION_INVOCATION_TIMEOUT after 10 or 15 seconds on an older project

If you see 504: GATEWAY_TIMEOUT with code FUNCTION_INVOCATION_TIMEOUT, the cause and the fix for Vercel are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
504: GATEWAY_TIMEOUT with code FUNCTION_INVOCATION_TIMEOUTTimeouts at 10 seconds on Hobby or 15 seconds on Pro while the docs promise 300 secondsLong AI or scraping calls die mid-stream
Cause
The 300 second default applies only when Fluid compute is on, and Fluid compute is enabled by default only for projects created on or after April 23, 2025. Older projects keep the legacy short defaults until Fluid is switched on or maxDuration is set.
Fix
Turn on Fluid compute for the project and redeploy, or set maxDuration on the function within your plan maximum.
Apply
// vercel.json { "fluid": true } // or in an App Router route file export const maxDuration = 300;
Affected
Projects created before 2025-04-23 without Fluid compute; Hobby legacy default 10 s (max 60 s), Pro legacy default 15 s
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun