Failed during stage “building site”. Command didnot finish within the time limit

Hi guys,

I have a site built on Gatsby/React, and when deplying it this week, all the builds are failing with the same error:

5:01:04 PM: Failed during stage “building site”: Command did not finish within the time limit

5:01:04 PM: Execution timed out after 18m10.000428803s

5:01:04 PM: Error running command: Command did not finish within the time limit

5:01:04 PM: Failing build: Failed to build site

5:01:04 PM: Finished processing build request in 20m13.84s

The weird thing is that the deploys were working just fine 7 or 10 days ago, and I only added a couple of lines of code to this new build, so its kinda strange.

Can someone help me update my build timeout to an hour?

My site:

Thanks!

Hi @NicoElvino,

Thanks for reaching out and welcome to Netlify’s Support Forums!

I’ve increased the build time limit for site helpful-mochi-8d37d6 to 30 minutes. Please let us know if you continue to have issues.

Hi Melvin,

Thanks for your help. Unfortunately it still fails with the same error message.

Console:

9:03:34 AM: Netlify Build
9:03:34 AM: ────────────────────────────────────────────────────────────────
9:03:34 AM: ​
9:03:34 AM: ❯ Version
9:03:34 AM: @netlify/build 29.25.0
9:03:34 AM: ​
9:03:34 AM: ❯ Flags
9:03:34 AM: baseRelDir: true
9:03:34 AM: buildId: 6549627049b46f06dca87462
9:03:34 AM: deployId: 6549627049b46f06dca87464
9:03:34 AM: ​
9:03:34 AM: ❯ Current directory
9:03:34 AM: /opt/build/repo
9:03:34 AM: ​
9:03:34 AM: ❯ Config file
9:03:34 AM: /opt/build/repo/netlify.toml
9:03:34 AM: ​
9:03:34 AM: ❯ Context
9:03:34 AM: deploy-preview
9:03:34 AM: ​
9:03:34 AM: ❯ Loading plugins
9:03:34 AM: - @netlify/plugin-gatsby@3.7.2 from Netlify app
9:03:34 AM: - @netlify/plugin-lighthouse@5.0.0 from Netlify app
9:03:35 AM: ​
9:03:35 AM: @netlify/plugin-gatsby (onPreBuild event)
9:03:35 AM: ────────────────────────────────────────────────────────────────
9:03:35 AM: ​
9:03:37 AM: Found a Gatsby cache. We’re about to go FAST. :zap:
9:03:37 AM: Please install gatsby-plugin-netlify and enable it in your gatsby-config.js. gatsby-plugin-netlify | Gatsby
9:03:37 AM: ​
9:03:37 AM: (@netlify/plugin-gatsby onPreBuild completed in 1.3s)
9:03:37 AM: ​
9:03:37 AM: Build command from Netlify app
9:03:37 AM: ────────────────────────────────────────────────────────────────
9:03:37 AM: ​
9:03:37 AM: $ npm run build
9:03:37 AM: > triiyo@2.0.0 build
9:03:37 AM: > gatsby build
9:03:41 AM: success compile gatsby files - 2.639s
9:03:41 AM: warning The following flag(s) found in your gatsby-config.js are not known:
9:03:41 AM: - THE_FLAG
9:03:41 AM: success load gatsby config - 0.041s
9:03:41 AM: warning Plugin gatsby-plugin-google-analytics is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:41 AM: warning Plugin gatsby-plugin-sharp is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:41 AM: warning Plugin gatsby-transformer-sharp is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:41 AM: warning Plugin gatsby-plugin-react-helmet is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:42 AM: warning Plugin gatsby-plugin-google-analytics is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:42 AM: warning Plugin gatsby-plugin-sharp is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:42 AM: warning Plugin gatsby-transformer-sharp is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:42 AM: warning Plugin gatsby-plugin-react-helmet is not compatible with your gatsby version 4.18.0 - It requires gatsby@^3.0.0-next.0
9:03:42 AM: success load plugins - 0.676s
9:03:42 AM: success onPreInit - 0.006s
9:03:42 AM: success delete worker cache from previous builds - 0.002s
9:03:42 AM: success initialize cache - 0.028s
9:03:42 AM: success copy gatsby files - 0.128s
9:03:42 AM: success Compiling Gatsby Functions - 0.143s
9:03:42 AM: success onPreBootstrap - 0.161s
9:03:43 AM: success createSchemaCustomization - 0.005s
9:03:46 AM: success Checking for changed pages - 0.000s
9:03:46 AM: success source and transform nodes - 2.939s
9:03:47 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
9:03:48 AM: success building schema - 1.602s
9:03:48 AM: success createPages - 0.625s
9:03:49 AM: success createPagesStatefully - 0.606s
9:03:49 AM: info Total nodes: 338, SitePage nodes: 124 (use --verbose for breakdown)
9:03:49 AM: success Checking for changed pages - 0.003s
9:03:49 AM: success Cleaning up stale page-data - 0.086s
9:03:49 AM: success onPreExtractQueries - 0.000s
9:03:55 AM: success extract queries from components - 5.615s
9:03:55 AM: success write out redirect data - 0.079s
9:03:55 AM: success onPostBootstrap - 0.001s
9:03:55 AM: info bootstrap finished - 17.899s
9:03:55 AM: success write out requires - 0.018s
9:03:55 AM: warning Browserslist: caniuse-lite is outdated. Please run:
9:03:55 AM: npx update-browserslist-db@latest
9:03:55 AM: Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
9:04:11 AM: Browserslist: caniuse-lite is outdated. Please run:
9:04:11 AM: npx update-browserslist-db@latest
9:04:11 AM: Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
9:04:13 AM: success Building production JavaScript and CSS bundles - 18.487s
9:04:23 AM: success Building HTML renderer - 9.451s
9:04:23 AM: success Execute page configs - 0.063s
9:04:23 AM: success Caching Webpack compilations - 0.000s
9:04:23 AM: success run queries in workers - 0.076s - 18/18 235.56/s
9:04:23 AM: success Merge worker state - 0.002s
9:04:23 AM: success Rewriting compilation hashes - 0.001s
9:04:23 AM: success Writing page-data.json files to public directory - 0.008s - 2/2 265.07/s
9:04:34 AM: filteredposts
9:04:34 AM: [
9:04:34 AM: {
9:04:34 AM: node: {
9:04:34 AM: id: “storyblokentry-391095012-default”,
9:04:34 AM: uuid: “1aaaf8e2-f4aa-4727-acfa-4a01c82672b7”,
9:04:34 AM: name: “Embracing Change: World Menopause Day”,
9:04:34 AM: slug: “embracing-change-world-menopause-day”,
(… proceeds to add a lot of this blogs…)
9:04:35 AM: }

9:04:35 AM: {
9:04:35 AM: “data-role”: “none”,
9:04:35 AM: className: “slick-arrow slick-prev”,
9:04:35 AM: style: { display: “block” },
9:04:35 AM: onClick: [Function: bound clickHandler],
9:04:35 AM: currentSlide: 0,
9:04:35 AM: slideCount: 8
9:04:35 AM: }

Then it does NOTHING for the rest of the time, until it times out:

9:33:41 AM: Execution timed out after 30m10.000857433s
9:33:41 AM: Error running command: Command did not finish within the time limit
9:33:41 AM: Failing build: Failed to build site
9:33:41 AM: Finished processing build request in 31m15.56s
9:33:41 AM: Failed during stage “building site”: Command did not finish within the time limit

Do you know what the issue could be? Maybe we can increase to an hour and see it that works?

Im really confused here as this build was running fine only a week ago, same code, nothing major changed, but not it simply doesnt build :confused:

Any help is much appreciated!

To provide some more context, on a previous build that was successful, it got to the same place but straight away it successfully built it:

6:19:55 PM: ‘data-role’: ‘none’,
6:19:55 PM: className: ‘slick-arrow slick-prev’,
6:19:55 PM: style: { display: ‘block’ },
6:19:55 PM: onClick: [Function: bound clickHandler],
6:19:55 PM: currentSlide: 0,
6:19:55 PM: slideCount: 8
6:19:55 PM: }
6:19:55 PM: success Building static HTML for pages - 6.900s - 121/121 17.54/s
6:19:55 PM: success onPostBuild - 0.020s

Confusing :confused:

Hi, I’d recommend you optimise your build.