-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A cache of '_site/images, .cache' doesn't exist (yet) #1
Comments
Hey @mirisuzanne @zachleat I wonder if a solution for this was ever nailed down? I have an 11ty site that builds 300+ files in 3.5 seconds locally (using the remote image cache) but on netlify, the build can take anywhere between 15-20 minutes. I've followed this link as a guide for my netlify toml config: https://github.com/11ty/demo-eleventy-img-netlify-cache And when the build happens, it seems to be using the cache: Successfully restored: frontend/dist/images, frontend/.cache, .cache ... 1881 files in total Just confusing me as to why the build should take so long, if it's not needing to fetch many new images. |
Hi @jacob-rh - what I discovered (thanks to Phil Hawksworth tracking it down) was that the eleventy build was working fine, but Netlify was failing to upload all the resulting images in their defined time limit. And Netlify only creates the cache once the upload is complete - so the cache never got built. We fixed it by limiting the number of images to upload in a series of preview builds, so that each build could completely upload and cache another subset of images. After 3 or 4 restricted builds to get all the images uploaded, everything is back in place, and deploys are working smoothly again. The first build only had eleventy-img generate small images in one format, then the other builds slowly increased image sizes and formats until I had the full set that I wanted. |
Thanks @mirisuzanne sorry to bother you again, but I wonder if you have any direct reference or an example of how you went about this? I'm struggling with an image-heavy site at the moment and the build time seems to be swinging from anywhere between 5 minutes and 20+ so something is still not quite right. |
@jacob-rh all I have is the commit log - it was around June, with Phil helping out - you can see several commits from him around this time: https://github.com/mirisuzanne/mia/commits/main?after=2500a606ef25e2485f90952a5fb5cd948057fce7+139&branch=main&qualified_name=refs%2Fheads%2Fmain |
Thanks so much for getting back to me again @mirisuzanne. Just wondering if you were using remote image sources for this approach? Or were all the images locally stored in the project? I just noticed that Phil's approach was using Feel like I'm at a dead end. |
Yeah, I'm not sure. I had some external images around then - for webmentions. But it was not the majority of my images. Hope you're able to find a solution, that's frustrating for sure. |
I must be doing something wrong. I followed all the setup instructions here, but I still have builds timing out at 26+ minutes, with this in the deploy log:
I also set up
netlify-plugin-debug-cache
which documents the cached files in a json file… that is consistently empty.I'm not sure how to debug this… Any help would be welcome! Thanks!
The text was updated successfully, but these errors were encountered: