Why does my Vercel function return 504 FUNCTION_INVOCATION_TIMEOUT?
Summary As of October 2026, Vercel's docs say this 504 means the function ran longer than its allowed duration, never returned a response, looped, or hit an unhandled exception. Check the logs, make slow calls finish in time, always return a response, and consider Fluid compute or Workflows for long jobs.