I made a kentcdodds inspired blog where I use Github as my CMS I store my blog content in the same repository as the code in mdx format, I made a workflow that when something changes in that directory I send the names of the files changed to the server at "/api/revalidate" then I download them on the server from Github, compile them (since I use mdx) and store them in the database that's basically it. problem is this whole operation takes too long and I end up with a "timeout exceeded 10s" on vercel any suggestions?
Asked
Active
Viewed 213 times
1 Answers
0
I have the exact same problem. In my case, I pull a document from a Firestore collection, and build the page based on this document. Both locally (using a production build with next start), and with a free trial of the Pro-plan, it all works as it should. I can't see how this should take 10 seconds, and in fact, when I tried with the Pro plan, it took only about a second to execute.
The only solution that comes to my mind is to try out the steps provided by Vercel (guide), or you might want to try moving the project into a free 14-day trial of the Pro plan, to see if this works for you.

Martin
- 66
- 3
-
1It's because I store some metadata as well as the code generated from the metadata to also a free plan database, which takes quite sometime. I've been able to get around this problem by spinning off a dedicated express sever on heroku with my student credits to the heavy lifting for me and I only call nextjs to only really revalidate the page itself. – SandStone Mar 02 '23 at 21:47