Build exceeded Maximum Runtime

Hey @luke , thanks for your help, but the problem persists.

Could you help me figure out how to solve this problem, please?


11:14:26 AM: Build ready to start
11:14:28 AM: build-image version: fd3b56fcdbaad56e70919e8a4b2da9b411ec3532 (xenial)
11:14:28 AM: build-image tag: v3.10.1
11:14:28 AM: buildbot version: 8a3c565585bf7313c6ec1052fd212f83330bb917
11:14:28 AM: Fetching cached dependencies
11:14:28 AM: Starting to download cache of 685.1MB
11:14:34 AM: Finished downloading cache in 5.866813406s
11:14:34 AM: Starting to extract cache
11:15:00 AM: Finished extracting cache in 25.983071617s
11:15:00 AM: Finished fetching cache in 31.986632924s
11:15:00 AM: Starting to prepare the repo for build
11:15:00 AM: Preparing Git Reference refs/heads/master
11:15:02 AM: Parsing package.json dependencies
11:15:02 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'client/vue-8base-starter-app/dist' versus 'dist' in the Netlify UI
11:15:02 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'client/vue-8base-starter-app/functions' versus 'functions' in the Netlify UI
11:15:03 AM: Starting build script
11:15:03 AM: Installing dependencies
11:15:03 AM: Python version set to 2.7
11:15:04 AM: Started restoring cached node version
11:15:06 AM: Finished restoring cached node version
11:15:07 AM: v12.18.0 is already installed.
11:15:07 AM: Now using node v12.18.0 (npm v6.14.4)
11:15:07 AM: Started restoring cached build plugins
11:15:07 AM: Finished restoring cached build plugins
11:15:08 AM: Attempting ruby version 2.7.1, read from environment
11:15:08 AM: Started restoring cached ruby version
11:15:08 AM: Finished restoring cached ruby version
11:15:10 AM: Using ruby version 2.7.1
11:15:11 AM: Using PHP version 5.6
11:15:11 AM: Started restoring cached node modules
11:15:11 AM: Finished restoring cached node modules
11:15:11 AM: Started restoring cached go cache
11:15:11 AM: Finished restoring cached go cache
11:15:11 AM: go version go1.14.4 linux/amd64
11:15:11 AM: go version go1.14.4 linux/amd64
11:15:11 AM: Installing missing commands
11:15:11 AM: Verify run directory
11:15:12 AM: ​
11:15:12 AM: ────────────────────────────────────────────────────────────────
11:15:12 AM:   Netlify Build                                                 
11:15:12 AM: ────────────────────────────────────────────────────────────────
11:15:12 AM: ​
11:15:12 AM: ❯ Version
11:15:12 AM:   @netlify/build 19.0.7
11:15:12 AM: ​
11:15:12 AM: ❯ Flags
11:15:12 AM:   baseRelDir: true
11:15:12 AM:   buildId: 61a5f982754976ef61b7ee7e
11:15:12 AM:   deployId: 61a5f982754976ef61b7ee80
11:15:13 AM: ​
11:15:13 AM: ❯ Current directory
11:15:13 AM:   /opt/build/repo/client/vue-8base-starter-app
11:15:13 AM: ​
11:15:13 AM: ❯ Config file
11:15:13 AM:   /opt/build/repo/client/vue-8base-starter-app/netlify.toml
11:15:13 AM: ​
11:15:13 AM: ❯ Context
11:15:13 AM:   production
11:15:13 AM: ​
11:15:13 AM: ────────────────────────────────────────────────────────────────
11:15:13 AM:   1. build.command from netlify.toml                            
11:15:13 AM: ────────────────────────────────────────────────────────────────
11:15:13 AM: ​
11:15:13 AM: $ npm run build
11:15:13 AM: > vuejs-todos-app@0.1.0 build /opt/build/repo/client/vue-8base-starter-app
11:15:13 AM: > vue-cli-service build
11:15:14 AM: -  Building for production...
12:29:26 PM: Build exceeded maximum allowed runtime

Hey there, @mcyouks :wave:

Thanks so much for following up, sorry to hear you are still encountering issues. Have you read through this guide about different ways to optimize your build time? This could be a good jumping off point: [Support Guide] How can I optimize my Netlify build time?

Thanks for your help @hillary !

The thing is that at the moment, I am not sure that this is the real issue. We have extended the build time, but it keeps exceeding the timeout.

Could we extend further the timeout, just so that we can confirm the app actually builds, please?

In the meanwhile, I will investigate the doc you shared :slight_smile:


I can see that you already have 1 hour of time limit. For an hour, your build simply logs just 1 line:

I’d advise to add additional logging to your build that could help you find the root of the issue.

Before we try to bump this further, can we know how long does it take to build locally? Have you had any success in finding out why the build is not moving past that line. The thing is, if we increase the build timeout, you’re simply burning off your build minutes without doing anything. So, instead of 1 hour, you’d now burn 1.5 hours of build minutes.

In most cases, we could see that the build was trying to do something and it got timed out, but in your case it seems like it’s not doing anything at all.

1 Like

Hey @hrishikesh thanks for your reply.

Your question is to the point.

Before we try to bump this further, can we know how long does it take to build locally?

When running npm run build and I get returned the following issue after more than 30 minutes of build time.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

To solve the issue locally, I inserted the following script in the package.json file:

"build": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js build"

From there, I executed the following steps:

  • I removed the node_modules
  • I cleaned the cache with npm clean cache --force
  • I installed the packages using npm install
  • I started the dev server using npm run serve and it compiled successfully
  • I built the app using npm run build and takes 20 minutes to build
  • Locally, it works successfully :tada:

Unfortunately, deploying on Netlify still does not work :cry:

1:43:58 PM: Build ready to start
1:44:00 PM: build-image version: fd3b56fcdbaad56e70919e8a4b2da9b411ec3532 (xenial)
1:44:00 PM: build-image tag: v3.10.1
1:45:49 PM: ────────────────────────────────────────────────────────────────
1:45:49 PM:   1. build.command from netlify.toml                            
1:45:49 PM: ────────────────────────────────────────────────────────────────
1:45:49 PM: ​
1:45:49 PM: $ npm run build
1:45:49 PM: > luego-app@0.1.1 build
1:45:49 PM: > node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js build
1:45:50 PM: -  Building for production...
2:58:58 PM: Build exceeded maximum allowed runtime
2:59:17 PM: internal/modules/cjs/loader.js:969
2:59:17 PM:   throw err;
2:59:17 PM:   ^
2:59:17 PM: Error: Cannot find module '/opt/build/repo/client/vue-8base-starter-app/node_modules/worker-farm/lib/child/index.js'
2:59:17 PM:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
2:59:17 PM:     at Function.Module._load (internal/modules/cjs/loader.js:842:27)
2:59:17 PM:     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
2:59:17 PM:     at internal/main/run_main_module.js:17:47 {
2:59:17 PM:   code: 'MODULE_NOT_FOUND',
2:59:17 PM:   requireStack: []
2:59:17 PM: }

I even cleaned the cache and redeployed it. But still, the issue continues :sleepy:

How come the app builds locally, and doesn’t work when deployed on Netlify?

What could have triggered the build to stop working properly anymore?

Thanks for your help :pray:


Hi, @mcyouks. I’m pretty sure the failure reason is still the timeout.

How powerful is your local system? I ask because it is probably true that your local computer is much more powerful than the container used for the build system at Netlify. Your build is guaranteed only 1 “virtual CPU” and 3 GB of memory, though it may get more when the system is less busy.

Your local system likely has multiple “cores” (aka “virtual CPUs”) and also probably has much more memory than 3 GB. If true, this means the build at Netlify is going to take much longer than 20 minutes.

It might help add logging to the site build in some way so you can see the timestamps for each line at Netlify to get an idea of how quickly the build is proceeding here. You could then compare that to a local builds timestamp and that would give you an idea of how much faster your local system is.

If you would like to test a longer build time, we can extend it again so please let us know if we should do so.

Thanks for your reply @luke,

Here are some additional information:

  • [Erratum] It takes 10 minutes to build locally
  • The app is built locally on my Macbook Pro 2016 Intel Core i5 2,9 GHz, 8Go RAM

The weird thing is that nothing really changed in the package.json when the app stopped building.

How could add logging to the site build in order to timestamp the build process?


Hey @mcyouks,

You could try to wrap your build script inside a Node.js script using spwan in childProcess and try to print usage logs like these (probably at a set interval):

I have the same building problem with my master production branch where build exceed maximum runtime. It doesn’t happen absolutely every single time but like 85% of the time.
Can you please increase the build runtime on the same site?
Workspace: ateliermotif-dev
Thank you in advance.

hi there @intpractice - we’d be happy to extend your build time (how high would you like us to set it?) but at the moment I see your account does not have a payment method (i.e. credit card) on file. We do need to have a payment method before we can make this change.

do let us know when you have added one, and we can get you set up!

Thanks for the quick response.
I just added a payment method to my account.
Let’s try increasing the minutes to 60 and see if this will be sufficient. Thank you!

hello again, thanks for adding that. we have bumped you up to 60 minutes for your account. enjoy!

Thanks for this perry, @perry! This worked perfect.

Hey there Netlify support. Same issue for me. Could I get a bump to 30 minutes? Site ID d97c6938-1ed3-4965-ba1d-f21d11aedb74

Hey @ashleynexvel,

The time limit has been raised.

Is there any chance it could be raised to 45 minutes?

Yup! Just bumped it again for you. Let us know how it goes!

My account also have problems with Build exceeded maximum allowed runtime, who can help me?


Could you please bump the time limit of my team’s site to 90 minutes?

Site ID: f662701f-fbf2-4e41-b736-9859a627eb56


hi there, we have upped you to 90 minutes!