#46 most commondeployv0CursorWindsurfBolt.new

FUNCTION_INVOCATION_TIMEOUT / 504 on Vercel (often AI API calls)

504: GATEWAY_TIMEOUT Code: FUNCTION_INVOCATION_TIMEOUT / Task timed out after 10.00 seconds

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

A server function in your app took longer than your host allows (common with AI calls that take a while), so the host cut it off.

How to fix it: paste this prompt into your AI builder

Fix prompt for Bolt, Cursor, v0, Windsurf
My Vercel function times out (FUNCTION_INVOCATION_TIMEOUT). Find the slow route. Make it faster or stream: stream AI responses instead of waiting for the full answer, set an appropriate maxDuration for the route within my plan's limit, add a timeout/abort with a clear error message to slow upstream calls, and make sure every code path returns a response. Do not change unrelated routes.

If the AI can't fix it: manual steps

  1. Check the function logs in Vercel (your project, Logs) to see which route is slow.

Where this happens

Seen in these AI app builders and editors:

v0CursorWindsurfBolt.new

Sources

Related deploy errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →