How to troubleshoot 504 GATEWAY_TIMEOUT error in logs page
Unanswered
Gray Silky-flycatcher posted this in #help-forum
Gray Silky-flycatcherOP
For my live site on Vercel, built with Next.js & linked to Mongoose, for around 20% of the time I get a 504 GATEWAY_TIMEOUT error.
I am trying to troubleshoot where this is coming from, but I have no idea where to start. Here's a screenshot of the logs in verse cell of one of the 504 errors. Could someone please point me in the right direction? I'm a beginner dev, so please dumb it down as much as you can!
Thanks
I am trying to troubleshoot where this is coming from, but I have no idea where to start. Here's a screenshot of the logs in verse cell of one of the 504 errors. Could someone please point me in the right direction? I'm a beginner dev, so please dumb it down as much as you can!
Thanks
5 Replies
most probably you can upstream api such as OpenAI api or something, but it doesn’t return in 10 seconds, which is cap time in hobby plan.
solutions
upgrade plan so cap time is 60sec
deploy Edge Runtime or self hosted on AWS or else
io bounds apps should be in Edge or self hosted though