Nuxt build hangs during the generation

Hi guys!

I am writing this thread to find out if other users have encountered the same problem before and to get some leads on how to solve it.

Concretely, I have a rather specific problem in the Netlify environment when building with Nuxt.

To give you all the context, we build a large website (1200+ pages) using Nuxt (v2.14.4) in about 9m minutes without cache and 3m with the cache on Netlify. In term of memory consumption, we are under 1GByte (max heap at 800MBytes) during all the build phase.

And here is the current situation:

  • on my machine, the build succeeds 99% of the time using the cli
  • on my machine and docker with the build image (and the recommended setup - 3GBytes of memory and 1 CPU), the same build succeeds as well
  • on Netlify, the build hangs very oftenly and when my build time limit is reached, the build failed
  • on all cases, build logs are clean (I defined CI=’’ to get verbose log so I’m 100% sure of that)

On the other hand, I noticed on my machine that sometimes it can take a long time between the generation of two pages (more than 10 seconds - probably related to the garbage collector) and I wonder if there is not a mechanism that considers the process dead after a certain period of inactivity?

It can be something else but I wonder why the same build can succeeded or failed without any changes between builds.

Thanks in advance for your help!

1 Like

Hey there, @ClementZezuka :wave:

Welcome to the Netlify Forums. Sorry to hear you are having build issues. A good starting place could be these Support Guides:

If you don’t see any resources that help you, can you respond with:

  1. Your site URL
  2. Your most recent deploy log
  3. Your build settings