Next.js Discord

Discord Forum

Timeout issue vercel

Unanswered
Far Eastern Curlew posted this in #help-forum
Open in Discord
Avatar
Far Eastern CurlewOP
How would I fix a vercel timeout issue for the api call to open ai? It seems like the 10 second timeout is the issue. My api call to open ai is taking longer than the 10 seconds.

6 Replies

Avatar
Asian black bear
The only option you have is to upgrade to Pro for a timeout of 60s.
Avatar
Far Eastern CurlewOP
Do you have vercel pro? Can you confirm the timeout is indeed 60 seconds? Do we need to adjust any settings or is that the default with pro? Thanks
Avatar
Willow shoot sawfly
https://vercel.com/guides/what-can-i-do-about-vercel-serverless-functions-timing-out

TLDR:
Maximum function durations
Hobby: 10s (default) - configurable up to 60s
Pro: 15s (default) - configurable up to 300s
Enterprise: 15s (default) - configurable up to 900s
In theory from what you say, you just need to change your config. Since hobbyist have max duration of 60s
Avatar
Asian black bear
Much to my surprise, this is true. It wasn't configurable for Hobby plan users, but it seemingly is now.
Image
Avatar
Willow shoot sawfly
Did it work?