[Common Issue] How long should Netlify builds take?

The only universal answer to this is: it varies. :slight_smile: More detail would probably be helpful, right? Below we explain which factors affect the lengths of builds on Netlify

One key factor is the site itself. Larger sites will take longer to build than smaller ones, and things like images and video can impact this (if those assets need to be downloaded or processed during build).

Another factor is the static site generator (SSG) being used (if any). The performance of SSGs varies widely. If the site takes a long time to build locally, that will also carry over to Netlify.

Also, the systems which handle the site builds are a shared resource (amongst Netlify users). When the network is under heavy load, newly scheduled builds will be queued instead of beginning immediately. (Pro tip: Monday through Friday - US and EU business hours - are normally the busiest times.)

When the load is high on the build system, and when utilizing our our Starter or Pro team plans, it is normal for builds to queue for up to fifteen (15) minutes. Again, this is for our starter and Pro tiers only.

Also when the load is high, it is possible that your build will be competing for scarce CPU/memory resources. Your build is guaranteed only 1CPU and 3Gb of memory, though it may get more when the system is less busy. This is probably far less than you build with locally, so times will not likely match your local unless you use a very efficient SSG like hugo.

If these longer build times are causing issues, one possible solution is to upgrade to our paid Enterprise tier. The custom plans use a prioritized build network or hardware dedicated to your account, and this generally leads to less build queueing and faster builds. Further, this unlocks the ability to customize resource allocation so that if you want to run a 20Gbyte build with 6 CPU’s, you can! There is more information about other plans here.

Finally, what happens in the situation where many git push actions occur in a short time window while there is queuing in the build network? (And it’s a good question!)

Answer: each push will trigger a deploy with Netlify but only the first and last actually build & deploy.

Here is a more detailed explanation. Let’s imagine you run a git push five times in a few minutes. Let’s also pretend your build takes 10 minutes to complete, so the last 4 deploys are queued.

So, what happens? Well, all five pushes will create deploys in your deploy listings page in the Netlify admin UI, and all will show as ‘building’ in the UI. But when the first deploy completes, the intermediate builds will all change to the status ‘skipped’ and then Netlify will build the last (most recent) deploy. We don’t waste our time or yours publishing builds that will be overwritten immediately.

If you notice unusually long queuing times for builds (for example, deployments taking longer than 30 minutes), please let us know in the comments below.

2 Likes

@luke Thanks for shedding some light on how the builds are working.I’ve seeing many users complaining about this. This is a real problem.
One common question i’m seeing in https://gitter.im/netlify/community is about System resources: How many RAM and CPU is available during build?
To be honest i taught build times are set to 30 mins before, because we were seeing timeouts after 30 mins, it could be just an illusion.
One solution might to have a more finer grained pricing solution between the starter and the pro where we can buy build time resources. The Pro tier is really about Team collaboration which makes sense, enabling 3 concurrent builds makes sense, but does the build resources are bigger in the PRO tier?

Hi, @zltnvrs. There is additional time allowed for post-processing and uploads. This is likely the reason for timeouts happening in 30 minutes instead of 15.

For additional build resources (for example, longer build times) a Business tier plan is required.

Regarding the RAM and CPU available in the build image, I am hoping someone else here at Netlify can answer that question.

1 Like

You should count on your builds having only 15 minutes to complete their build command. The additional time for processing and uploading will be added to that and do not need to complete within that initial 15 minutes, and in some cases for very large sites or if our system is busy, they may stretch out to minutes or even an hour (the latter only for tens of thousands of new files in a deploy).

Around unexpected timeouts, I’d suggest some reading here: [Common Issue] Hung or stuck, but seemingly successful build . There are builds that legitimately run for more than 15 minutes, but most cases are something like that: “oops, I started a server” or “my framework left some processes running that made Netlify think the build wasn’t done yet”.

Regarding build resources, what you are guaranteed on our free and Pro plans is identical: approximately 1 CPU and around 2Gb of memory. You may get more - these containers run on machines that could hold 5 other simultaneous builds…or 0 others. The available memory also has to cover the linux instance that runs within the build environment.

Business-level customers can scale to just about any size and length build; we have some running 24Gb builds with a 3 hour timeout (these builds tend to do things like scrape data from several sources and build every page from scratch on sites with >10,000 files).

@zltnvrs, Your suggestion about pricing was not missed and I’ve additionally mentioned it to our sales and marketing teams that set our pricing. They love hearing feedback like that as they make decisions about our future offerings, so please keep it coming!

3 Likes