Gatsby no longer building/deploying, should I use Large Media?

I have had a successfully, continuously deployed site on Netlify for a month or two now but this recent build attempt seems to be failing.

The website is — just a small blog but with lots of imagery.

The build has been timing out as you can see from the below:

10:46:47 PM: success run page queries — 33.184 — 11/11 0.33 queries/second
11:03:15 PM: success Generating image thumbnails — 975/975 - 1073.865 s
11:03:17 PM: success Building static HTML for pages — 2.737 — 11/11 19.71 pages/second
11:03:17 PM: info Done building in 1082.177 sec
11:03:19 PM: Execution timed out after 15m0s
11:03:19 PM: Error running command: Command did not finish within the time limit
11:03:19 PM: Failing build: Failed to build site
11:03:19 PM: failed during stage 'building site': Command did not finish within the time limit
11:03:19 PM: Finished processing build request in 22m2.354226916s
11:03:19 PM: Shutting down logging, 0 messages pending

I thought it may be the amount of imagery that is causing the issue, so I have attempted to switch to Large Media using Git LFS but the errors I get now are:

12:29:15 AM: success onPostBootstrap — 0.333
12:29:15 AM: info bootstrap finished - 4.703 s
12:29:15 AM: error Failed to process image 
12:29:15 AM:
12:29:15 AM: Error: Input file contains unsupported image format
12:29:15 AM:
12:29:15 AM: Skipping functions preparation step: no functions directory set
12:29:15 AM: Caching artifacts
12:29:15 AM: Started saving node modules
12:29:15 AM: Finished saving node modules

Which I now realise is due to the fact that gatsby-image plugins and transformers don’t work in this way.

If anyone would be able to lend a helping hand and guide me in the right direction it would be appreciated.


Edit: I’ve resorted to manual deployment for now — it seems I’d have to refactor some code or resort to something like Cloudinary for image hosting, for a small site like this I’ll just manually deploy. I am trying out a plugin called gatsby-plugin-netlify-cache to reduce deploy time.

Hi, @andrwrbnsn. I would recommend Netlify Large Media in two situations:

  1. The checkout/clone of the git repo itself was taking a long time.
  2. You are going to use Large Media’s image transformations.

However, neither of these appear to be true. The slow part of the build isn’t the git clone. And the image transformations are not being done by Large Media.

It does appear that the majority of build time is spent on image transformation. (Taking 1073.865 seconds to build 975 thumbnails.)

If these are locally available images, one solution might be to transform them once and then commit them to the git repo transformed so it doesn’t need to be done again. (I realize this may not be the “Gatsby way” to do things but it would remove this repetitive and time consuming step from the build processes.)

Again, it may also be possible to refactor this build process to use Large Media transformations instead of the Gatsby library.

If you would like additional information about any of this or there are other questions, please reply here anytime. :slight_smile: