🚀Timed out (504 Timeout)
504: GATEWAY_TIMEOUT · FUNCTION_INVOCATION_TIMEOUT
The server couldn't answer within the time limit, so it was cut off. Serverless functions have a limit on how long they can run.
🤔 Why does it happen?
- A slow task, like generating an AI answer or handling a big file, was done all at once
- The database or an outside API is slow or not responding
- The code never finishes and just keeps waiting
🔧 Try this
- Split slow tasks into smaller parts, or send results a little at a time (streaming)
- Check your hosting service's time limit for running code
- Check the server logs to see where it got stuck
🤖 Ask your AI like this
I get 504 Gateway Timeout when I run [which feature]. Please find which step takes so long, and suggest ways to make it finish within the time limit (splitting it up, streaming, or running it in the background).
Replace the [ ] parts with your own situation, and paste the error with a few extra lines before and after it.
Related terms
Other errors in this group
- Build failed (deploy failed)
Build failed - Missing environment variable
Missing environment variable - Wrong API key
Invalid API key - Domain not found (DNS)
DNS_PROBE_FINISHED_NXDOMAIN - Secure connection error (SSL certificate)
Your connection is not private - Deployed site shows 404 (Vercel NOT_FOUND)
404: NOT_FOUND (Vercel) - Server function failed to run (FUNCTION_INVOCATION_FAILED)
500: FUNCTION_INVOCATION_FAILED - Environment variable is undefined in the browser
process.env 값이 브라우저에서 undefined - Only a white screen after deploying
배포했더니 흰 화면만 나와요