VERCEL ERRORS

FUNCTION_INVOCATION_TIMEOUT on Vercel

A Vercel Function ran longer than its allowed duration. The documented causes are slow upstream calls, no response, an infinite loop or an unhandled exception.

FUNCTION_INVOCATION_TIMEOUT (Gateway Timeout)

What it means

Vercel documents this error as a function invocation that takes longer than the allowed execution time. The cause can be an error in the function, a slow network call, or the environment the function runs in.

How to fix it

  1. Make sure API and database requests made by the function answer within the maximum duration for your plan.
  2. If the work needs more time, Vercel suggests enabling Fluid compute for significantly longer durations. For work that needs unlimited execution time, it points to Vercel Workflows.
  3. Make sure the function always returns an HTTP response, even an error response. A function that returns nothing times out.
  4. Check that no loop runs forever.
  5. Check that any external API or database the function calls is not failing.
  6. Look for unhandled exceptions in the application logs, which are available at the deployment's host URL under the /_logs path.

What a DeployDoctor scan can check

A repository scan cannot measure how long a request takes, so it cannot confirm or diagnose a timeout. It can flag server code that Vercel cannot run at all, such as Playwright, Puppeteer, SQLite bindings and filesystem writes.

Sources

Documentation last checked 2026-10-28. Vercel can change its documentation; confirm against the linked pages.