Briefly summarize the issues you have been experiencing.
I’m creating a GatsbyJS site that will be 11 pages of design project images (including process). Specifically, the projects are thesis projects from a design program I was recently in. So, each person is adding about 15–25 relatively high-res images, and these are generating a pretty big cache once Gatsby. However, I can’t imagine that it’s that much larger than a typical design portfolio or blog might be. The cache is about 675mb so far, which I think mostly comes from images that have been optimized into multiple sizes of thumbnails, each.
Typically, the build gets to about here, then stalls out:
9:47:48 PM: success run static queries — 105.181 s — 7/7 0.07 queries/second
9:47:48 PM: success run page queries — 0.099 s — 15/15 152.49 queries/second
9:47:48 PM: success write out page data — 0.004 s
9:47:48 PM: success write out redirect data — 0.001 s
10:14:02 PM: Build exceeded maximum allowed runtime
I believe this is where images are being processed.
It does work if I use gatsby build && netlify deploy --prod
to deploy from my computer.
However, the time I did this, then did a subsequent push to the repo, the automated build acted a little better, getting to here before timing out:
6:25:19 PM: success write out redirect data — 0.002 s
6:51:13 PM: Build exceeded maximum allowed runtime
6:51:29 PM: error UNHANDLED REJECTION
6:51:29 PM:
6:51:29 PM: Error: Failed to process image /opt/build/repo/src/projects/katja/assets/katja _pres_3000x1800-01.png
6:51:29 PM:
6:51:32 PM: (sharp:1334): GLib-CRITICAL **: 22:51:32.680: g_hash_table_lookup: assertion 'hash_table != NULL' failed
6:51:33 PM: Execution timed out after 15m0s
6:51:33 PM: Error running command: Command did not finish within the time limit
6:51:33 PM: Failing build: Failed to build site
Worst-case scenario, I can build locally and deploy. However, this is not ideal, because I very much hope that my classmates can make changes in the GitHub repo, and that those could automatically trigger a successful rebuild when they are merged in Master. This would make collaboration much more seamless.
Please provide a link to your live site hosted on Netlify
(Please don’t share this out, as it’s a work-in-progress version which we are not yet making public).
What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?
I realize that the problem is being caused by the build time exceeding 15 minutes.
I have attempted to solve the issue by clearing out console errors, cleaning up my react components with proper ComponentWillMount
state setting, and updating dependencies to prevent build errors.
I also hoped that building & deploying locally might update the server cache and make the server builds work more quickly, but that doesn’t seem to be the case.
Do you have any other information that is relevant, such as links to docs, libraries, or other resources?
This GatsbyJS issue seems to potentially be related, as it describes a hanging process at the same step: Extremely long (25+ min) build time happening randomly.
Is there anything I might be able to do to make these automatic deployments work again, or do they just totally stop working once enough images are being processed?
Thanks for any insights or pointers!