"No Gatsby cache found. Building fresh" every time

Hello @hillary
I am having same problems as above. I have tried installing plugin via UI or through netlify.toml, didnt help. Gatsby v 3.1.2. Can you help me with it please?
Here is my deploy log (its private repo so cant give you link):
2:24:30 PM: Build ready to start
2:24:32 PM: build-image version: be42e453d6c8f171cc2f654acc29c0a8b60e6d93
2:24:32 PM: build-image tag: v3.7.1
2:24:32 PM: buildbot version: 449a896d650f66a48d6924703527235917156153
2:24:32 PM: Fetching cached dependencies
2:24:33 PM: Starting to download cache of 381.3MB
2:24:36 PM: Finished downloading cache in 3.783328282s
2:24:36 PM: Starting to extract cache
2:24:51 PM: Finished extracting cache in 15.215106742s
2:24:52 PM: Finished fetching cache in 19.13159458s
2:24:52 PM: Starting to prepare the repo for build
2:24:52 PM: Preparing Git Reference refs/heads/master
2:24:54 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘public’ versus ‘public/’ in the Netlify UI
2:24:55 PM: Starting build script
2:24:55 PM: Installing dependencies
2:24:55 PM: Python version set to 2.7
2:24:55 PM: Started restoring cached node version
2:24:59 PM: Finished restoring cached node version
2:24:59 PM: Downloading and installing node v12.13.0…
2:25:00 PM: Downloading https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz
2:25:00 PM: Computing checksum with sha256sum
2:25:00 PM: Checksums matched!
2:25:03 PM: Now using node v12.13.0 (npm v6.12.0)
2:25:03 PM: Started restoring cached build plugins
2:25:03 PM: Finished restoring cached build plugins
2:25:03 PM: Attempting ruby version 2.6.2, read from environment
2:25:04 PM: Using ruby version 2.6.2
2:25:05 PM: Using PHP version 5.6
2:25:05 PM: Started restoring cached node modules
2:25:05 PM: Finished restoring cached node modules
2:25:05 PM: Installing NPM modules using NPM version 6.12.0
2:25:51 PM: > sharp@0.27.2 install /opt/build/repo/node_modules/sharp
2:25:51 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
2:25:52 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-linux-x64.tar.br
2:25:55 PM: > core-js@3.10.0 postinstall /opt/build/repo/node_modules/core-js
2:25:55 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
2:25:55 PM: > core-js-pure@3.10.0 postinstall /opt/build/repo/node_modules/core-js-pure
2:25:55 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
2:25:55 PM: > gatsby-telemetry@1.10.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
2:25:55 PM: > node src/postinstall.js || true
2:25:55 PM: > gatsby-cli@2.19.2 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
2:25:55 PM: > node scripts/postinstall.js
2:25:55 PM: > gatsby@2.32.11 postinstall /opt/build/repo/node_modules/gatsby
2:25:55 PM: > node scripts/postinstall.js
2:25:58 PM: npm WARN risoto-shop@1.0.0 No repository field.
2:25:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
2:25:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:25:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
2:25:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:25:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
2:25:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
2:25:58 PM: added 625 packages from 187 contributors, removed 1076 packages, updated 554 packages and audited 2748 packages in 52.471s
2:25:58 PM: found 4 vulnerabilities (3 low, 1 high)
2:25:58 PM: run npm audit fix to fix them, or npm audit for details
2:25:58 PM: NPM modules installed
2:25:58 PM: Started restoring cached go cache
2:26:00 PM: Finished restoring cached go cache
2:26:00 PM: Installing Go version 1.12
2:26:00 PM: unset GOOS;
2:26:00 PM: unset GOARCH;
2:26:00 PM: export GOROOT=‘/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64’;
2:26:00 PM: export PATH=“/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}”;
2:26:00 PM: go version >&2;
2:26:00 PM: export GIMME_ENV=‘/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env’;
2:26:00 PM: go version go1.12 linux/amd64
2:26:00 PM: Installing missing commands
2:26:00 PM: Verify run directory
2:26:02 PM: ​
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: Netlify Build
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: ​
2:26:02 PM: ❯ Version
2:26:02 PM: @netlify/build 10.2.3
2:26:02 PM: ​
2:26:02 PM: ❯ Flags
2:26:02 PM: deployId: 606da47e604a3c0007fa2999
2:26:02 PM: ​
2:26:02 PM: ❯ Current directory
2:26:02 PM: /opt/build/repo
2:26:02 PM: ​
2:26:02 PM: ❯ Config file
2:26:02 PM: /opt/build/repo/netlify.toml
2:26:02 PM: ​
2:26:02 PM: ❯ Context
2:26:02 PM: production
2:26:02 PM: ​
2:26:02 PM: ❯ Loading plugins
2:26:02 PM: - netlify-plugin-gatsby-cache@0.3.2 from netlify.toml and package.json
2:26:02 PM: ​
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: 1. onPreBuild command from netlify-plugin-gatsby-cache
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: ​
2:26:02 PM: No Gatsby cache found. Building fresh.
2:26:02 PM: ​
2:26:02 PM: (netlify-plugin-gatsby-cache onPreBuild completed in 209ms)
2:26:02 PM: ​
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: 2. Build command from Netlify app
2:26:02 PM: ────────────────────────────────────────────────────────────────
2:26:02 PM: ​
2:26:02 PM: $ gatsby build
2:26:05 PM: success open and validate gatsby-configs - 0.067s
2:26:06 PM: success load plugins - 0.807s
2:26:06 PM: success onPreInit - 0.138s
2:26:06 PM: success delete html and css files from previous builds - 0.004s
2:26:06 PM: success initialize cache - 0.010s
2:26:06 PM: success copy gatsby files - 0.043s
2:26:06 PM: success onPreBootstrap - 0.016s
2:26:06 PM: success createSchemaCustomization - 0.007s
2:26:06 PM:
2:26:06 PM: gatsby-source-shopify/risoto-shop starting to fetch data from Shopify
2:26:06 PM:
2:26:06 PM: gatsby-source-shopify/risoto-shop fetched and processed Collection nodes: 186.080ms
2:26:06 PM:
2:26:06 PM: gatsby-source-shopify/risoto-shop fetched and processed Shop nodes: 178.341ms
2:26:06 PM:
2:26:06 PM: gatsby-source-shopify/risoto-shop fetched and processed ShopPolicy nodes: 182.796ms
2:26:06 PM:
2:26:06 PM: gatsby-source-shopify/risoto-shop fetched and processed Blog nodes: 195.480ms
2:26:07 PM:
2:26:07 PM: gatsby-source-shopify/risoto-shop fetched and processed Page nodes: 321.444ms
2:26:07 PM:
2:26:07 PM: gatsby-source-shopify/risoto-shop fetched and processed Article nodes: 417.496ms
2:26:12 PM: success Downloading remote files - 5.722s - 120/120 20.97/s
2:26:12 PM:
2:26:12 PM: gatsby-source-shopify/risoto-shop fetched and processed Product nodes: 5978.301ms
2:26:12 PM:
2:26:12 PM: gatsby-source-shopify/risoto-shop finished fetching data from Shopify: 5972.184ms
2:26:12 PM: success Checking for changed pages - 0.000s
2:26:12 PM: success source and transform nodes - 6.108s
2:26:13 PM: success building schema - 0.596s
2:26:13 PM: info Total nodes: 444, SitePage nodes: 36 (use --verbose for breakdown)
2:26:13 PM: success createPages - 0.054s
2:26:13 PM: success Checking for changed pages - 0.000s
2:26:13 PM: success createPagesStatefully - 0.105s
2:26:13 PM: success update schema - 0.036s
2:26:13 PM: success onPreExtractQueries - 0.001s
2:26:14 PM: success extract queries from components - 0.757s
2:26:14 PM: success write out redirect data - 0.002s
2:26:14 PM: warning The icon(static/favicon.png) you provided to ‘gatsby-plugin-manifest’ is not square.
2:26:14 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.
2:26:14 PM: success Build manifest and related icons - 0.328s
2:26:14 PM: success onPostBootstrap - 0.331s
2:26:14 PM: info bootstrap finished - 11.927s
2:26:29 PM: warning Query takes too long:
2:26:29 PM: File path: /opt/build/repo/src/components/Cart/CartThumbnail.js
2:26:29 PM: warning Query takes too long:
2:26:29 PM: File path: /opt/build/repo/src/components/Product/ProductMainImage.js
2:26:29 PM: warning Query takes too long:
2:26:29 PM: File path: /opt/build/repo/src/components/ProductListing/ProductListing.js
2:26:29 PM: warning Query takes too long:
2:26:29 PM: File path: /opt/build/repo/src/components/shared/SiteMetadata.js
2:27:35 PM: success run static queries - 81.291s - 4/4 0.05/s
2:28:07 PM: success run page queries - 31.795s - 45/45 1.42/s
2:28:07 PM: success write out requires - 0.088s
2:31:44 PM: success Building production JavaScript and CSS bundles - 216.687s
2:31:46 PM: success Rewriting compilation hashes - 0.770s
2:49:42 PM: success Building HTML renderer - 9.519s
2:49:43 PM: success Building static HTML for pages - 0.730s - 45/45 61.65/s
2:49:43 PM: success Generating image thumbnails - 1408.442s - 2360/2360 1.68/s
2:49:43 PM: success onPostBuild - 0.034s
2:49:43 PM: info Done building in 1420.574906185 sec
2:49:43 PM: ​
2:49:43 PM: (build.command completed in 23m 40.9s)
2:49:43 PM: ​
2:49:43 PM: ────────────────────────────────────────────────────────────────
2:49:43 PM: 3. onPostBuild command from netlify-plugin-gatsby-cache
2:49:43 PM: ────────────────────────────────────────────────────────────────
2:49:43 PM: ​
2:49:48 PM: Stored the Gatsby cache to speed up future builds.
2:49:48 PM: ​
2:49:48 PM: (netlify-plugin-gatsby-cache onPostBuild completed in 5.2s)
2:49:48 PM: ​
2:49:48 PM: ────────────────────────────────────────────────────────────────
2:49:48 PM: 4. Deploy site
2:49:48 PM: ────────────────────────────────────────────────────────────────
2:49:48 PM: ​
2:49:48 PM: Starting to deploy site from ‘public’
2:49:49 PM: Creating deploy tree asynchronously
2:49:49 PM: Creating deploy upload records
2:49:52 PM: 58 new files to upload
2:49:52 PM: 0 new functions to upload
2:49:52 PM: Site deploy was successfully initiated
2:49:52 PM: ​
2:49:52 PM: (Deploy site completed in 4.1s)
2:49:53 PM: ​
2:49:53 PM: ────────────────────────────────────────────────────────────────
2:49:53 PM: Netlify Build Complete
2:49:53 PM: ────────────────────────────────────────────────────────────────
2:49:53 PM: ​
2:49:53 PM: (Netlify Build completed in 23m 51s)
2:49:53 PM: Execution timed out after 24m58.147551752s
2:49:53 PM: Error running command: Command did not finish within the time limit
2:49:53 PM: Failing build: Failed to build site
2:49:53 PM: Failed during stage ‘building site’: Command did not finish within the time limit
2:49:53 PM: Finished processing build request in 25m20.708055275s
2:49:59 PM: Starting post processing
2:49:59 PM: Post processing - HTML
2:50:03 PM: Post processing - header rules
2:50:03 PM: Post processing - redirect rules
2:50:03 PM: Post processing done
2:50:03 PM: Site is live :sparkles:

Same issue here +1 !

Hey all! As this plugin isn’t managed by the Netlify org, the best thing to do would be to create an issue over on the repo for the build plugin and work with the maintainers to address this:

So I have found what is wrong. As you can see in bottom of log, it says that Command did not finish within the time limit. It is because Netlify Build time limit is 15minutes. Site got deployed but cache was not stored, even if it says its stored. So solution is to reduce build time temporary (in my case it was removing some products from sales channel), netlify saves that part to cache and continually get back everything as it was, since next build will use data from cache.

1 Like

Thanks for sharing this with us, @qubis741!

This solved my issue as well, thanks @qubis741

3 Likes

Interesting, and also a bit of a catch-22 because the un-cached build take a lot longer.

1 Like

Hi @stevepepple,

I’m not sure I understood what you meant. Could you please elaborate?

Sure, Currently our build take 30-40 minutes, so it times out and never gets cached.

that makes sense - thanks for elaborating. We can bump you up to a higher build time so you can at least get a build completed if you have a payment method (i.e credit card) on file with us? (we do need that in case you go over on build minutes). Let me know the site name and if you’d like us to bump you up.

Thanks so much. Yes, I’m a paying customer. The site name is thirsty-northcutt-9dfc94

hey steve, we have bumped you up to 45 mins build time. give it a try, and hopefully it’ll work!

1 Like

Awesome. Great, will do!

Hey there, I seem to be facing this same issue (build takes too long so cache is not saved) and wondering if you could do the same for my org? Also a paying customer. Site name is competent-tesla-446676

hi there @pascal, we bumped your build time, do let us know if it works now. thanks!

Hi @perry, could you bump the build times for me as well - build times gone up to around 18mins. Site name: inkhouse-master

Thanks!

Hey there, @nurou :wave:

Thanks for reaching out, and welcome to the Forums! We have increased your build time limit to 30 minutes.

Happy building :netliconfetti:

1 Like

Hi @hillary the builds for our sites are going beyond the 15m marker. We are a paying customer and it would help a tonne if the build limit time could be bumped up please. The team name is BrightHR.com.

Many thanks.

Hey there, @Bright1 :wave:

Thanks for your patience! I have increased your build time limit to 30 minutes. Let me know if that does the trick for you :slight_smile:

@pixelsmatter, please share your site name.