Fix · Vercel and deploying
Function timeout (504) on Vercel
Blocks your workNot checked against the vendor's current screens
What you may see
- An action spins and then fails after 10 seconds or more
- The page shows 504 or FUNCTION_INVOCATION_TIMEOUT
Most likely cause
The server code takes longer than the time Vercel allows for one request, usually a slow database call, a slow outside service, or work that should be done in the background.
Check first (about two minutes)
- In the Vercel project, open the function logs for the failing time and find the route name.
- Time the same action locally: is it slow there too?
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find which route times out and what it waits for (database, outside service, file work).
- Find the slow step with simple timing logs, then speed it up (an index, fewer queries, a smaller response, a cache).
- If the work is truly long (images, reports, emails), move it to a background job and return at once, and tell me the options for my plan.
- Only if needed, explain how to raise the maximum duration for that one route and what plan limits apply.
Do not do this
- Do not retry forever in a loop: it makes the load worse.
- Do not raise limits for every route.