The Prompt BakeryTemplates and prompts

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)

  1. In the Vercel project, open the function logs for the failing time and find the route name.
  2. 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

  1. Find which route times out and what it waits for (database, outside service, file work).
  2. Find the slow step with simple timing logs, then speed it up (an index, fewer queries, a smaller response, a cache).
  3. 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.
  4. 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.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.