#Deployment of Next.js app on Vercel failed and no error messages

36 messages · Page 1 of 1 (latest)

soft mist
#

I am currently using the pages directory in Next.js 14.1.0, and our app is deployed on Vercel. Since yesterday, the deployment duration has increased from the previous 5 mins to 45+ mins, and most of the deployments are failing. No error messages are visible. 🤔

I have tried both Node 18 and Node 20, btw another identical project (same code for test environment) can build successfully and quickly. (API issues have been ruled out)

obsidian salmonBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

soft mist
#

During the slow build at around 70%, it suddenly terminates and indicates build failure with no visible error messages 🧐

desert eagle
#

that's why your build is slow

#

back in 14.0.x, what was the number of statically generated pages?

soft mist
desert eagle
#

so in 14.0.x you still generated near 1k pages? interesting, never seen 1k pages being generated that fast before

soft mist
soft mist
#

we have another vercel project with the same codebase, and the build is going smoothly

desert eagle
#

since you says it went wrong from 14.1.0, im asking if it was the same number before 14.1.0

soft mist
desert eagle
#

honestly i don't know either. now 1k pages is a gigantic number and typically you don't want to generate that many; you may want to use dynamicParams: true to generate less important pages on-demand instead. but it's not relevant to the next version or why it works elsewhere but not here – about this part i don't have any ideas either

soft mist
#

We have tens of thousands of news articles, and currently, we have pre-generatea few hundred of them, and the rest will be generated on-demand based on ISR.

Since these news articles receive high traffic, we want them to be static and pre-generate so that they can respond as quickly as possible when the links are clicked

#

btw we are using pages dir at the moment

desert eagle
#

ok now this is something really strange and idk why it happens either

#

maybe try typical steps like rebuilding without cache

soft mist
#

this is the result of another vercel project under the same codebase, just deployed, the additional 2-3 mins are because the server we use for testing is not as robust as the prod env

soft mist
#

strangely after the build failure, there is no error message visible 👀

desert eagle
#

let's try this. rerun a failed build, and see how long on average does each page generation take

#

and do it for the successful build as well

#

you can try console.time and console.timeEnd to also log that time duration

soft mist
#

Hit the limit again in the prod env and in the build logs, we can roughly calculate that in the case of failure, each page takes an average of 26 sec

#

but in the same prod env (2 days ago), each page took only around 0.5 sec

soft mist
#

there is a huge diff in duration 🤔 we have also checked the API service and found no issues, no rete limit

desert eagle
#

when building locally, how much does it take on avg?

soft mist
#

Let me give it a try, there might be a diff depending on the machine performance

soft mist
desert eagle
#

ok now that is really strange. can you try making a new vercel project and deploying on there, does that fix it?

#

if not probably time to contact vercel support

soft mist
#

yeah, I think it's time to get in touch with vercel, thank your for your help 🫡 🙏