Vovy finds which step in your API route is slow, explains Vercel's time limits for your plan, and moves long work out of the request so it stops timing out.
My API route times out with FUNCTION_INVOCATION_TIMEOUT, fix it
How it works
- Find the timed-out requests: Vovy filters Vercel Logs for 504 and FUNCTION_INVOCATION_TIMEOUT, which means your function ran past its maximum duration and got cut off.
- Check your duration limit: It reads your plan and the maxDuration setting. With Fluid compute, Hobby functions cap at 300 seconds; Pro can go to 800.
- Time each step of the route: Cursor adds temporary timing logs around each external call, like an AI request or a big database query, to see which one hangs.
- Move slow work to the background: For long jobs, Vovy sets up a queue with Upstash QStash so the route answers right away and the work finishes separately.
- Confirm it responds in time: You get a card with the old and new response time and which step was the culprit.
What you provide
- The route that times out
- Your project open in Cursor
What you get
- The slow step identified
- Your plan's real time limit
- Background job setup if needed
- Faster route
FAQ
Can I just raise the timeout?
Sometimes, with maxDuration in your route config, up to your plan's cap. But users will not wait minutes for a page, so long work belongs in the background.
Why does my AI call time out?
Long AI responses can take a while. Streaming the response back sends the first words immediately and keeps the connection alive.
Does upgrading to Pro fix it?
It raises the ceiling to 800 seconds, but a slow database query or hung API call needs fixing either way.
Related tasks
All tasks