Comments (9)
OK, thanks for the detail. I'm working on the plugin right now, so wil be looking into that too
from netlify-plugin-gatsby.
Hi @shameer-rahman ,
Thanks for the update. I'm going to put some more thought into how we can best deal with this.
from netlify-plugin-gatsby.
i'm facing the same issue
Failed to upload file: __ssr
10:56:52 AM: Failed to upload file: __dsg
10:56:52 AM: Site deploy was successfully initiated
10:56:52 AM: Execution cancelled
10:56:52 AM: Error running command: Command was cancelled
10:56:52 AM: Failing build: Failed to build site
from netlify-plugin-gatsby.
Same issue on Netlify CI with:
"@netlify/plugin-gatsby": "^2.0.0-zz-beta.0"
"gatsby-plugin-netlify": "^4.0.0-next.0"
Using Yarn if that makes a difference.
6:38:27 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
6:38:36 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
6:38:39 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
6:38:52 PM: Request must be smaller than 69905067 bytes for the CreateFunction operation
6:38:52 PM: Failed to upload file: __ssr
6:39:21 PM: Failed to upload file: __dsg
6:39:21 PM: Site deploy was successfully initiated
6:39:21 PM: Execution cancelled
6:39:21 PM: Error running command: Command was cancelled
6:39:21 PM: Failing build: Failed to build site
6:39:21 PM: Finished processing build request in 12m26.931180725s
from netlify-plugin-gatsby.
The problem appears to be that the ssr files that Netlify generates (found in .netlify/functions/__ssr.zip
when running a build on Netlify) exceed a ~64mb limit that is imposed by AWS Lambda. Here's an answer in a Netlify forum that states this: netlify forum link.
I believe this SSR functionality is treated as a Netlify Serverless Function which ultimately becomes an AWS Lambda function.
Unfortunately I'm not sure what files are ultimately added to the __ssr.zip
file so I'm not sure how to reduce it's size. @ascorbic Could you offer additional insight or any ideas for reducing the __ssr.zip
file size?
Note: I added the code below to my netlify.toml
file, but the total size of my ssr.zip
is currently 81mb.
[functions] node_bundler = "esbuild"
from netlify-plugin-gatsby.
For anyone interested in determining their Netlify function/ssr size here's a useful guide (not an official Netlify guide): article link.
from netlify-plugin-gatsby.
Hi. Are you able to see what the large files are in the zip?
from netlify-plugin-gatsby.
The largest folder seems to be __ssr/.cache/page-ssr/routes/
(137mb of the 191 mb in __ssr/.cache/
). If I understand correctly, this data comes from the .cache
folder that gatsby generates, and the routes
folder contains the page data for every page that gatsby generates (~200 pages in my case).
With my current setup, I'm server-rendering only 1 page and statically generating the rest, but it seems that the data for every page is included in the __ssr
folder which then exceeds the Lambda limit.
from netlify-plugin-gatsby.
@ascorbic, thanks for addressing this issue, however after the updating the plugin i still get the same error
12:35:00 PM: 5. @netlify/plugin-gatsby (onPostBuild event)
12:35:11 PM: The function zip ../../../tmp/zisi-61f8f946bf9f477e6f6d154b/__dsg.zip size is 144 MB, which is larger than the maximum supported size of 52.4 MB.
12:35:11 PM: There are a few reasons this could happen, such as accidentally bundling a large dependency or adding lots of files to "included_files".
12:37:58 PM: Failed to upload file: __ssr
12:38:16 PM: Failed to upload file: __dsg
12:38:16 PM: Site deploy was successfully initiated
12:38:17 PM: Execution timed out after 25m55.148694295s
12:38:17 PM: Error running command: Command did not finish within the time limit
12:38:17 PM: Failing build: Failed to build site
12:38:17 PM: Finished processing build request in 26m40.773676931s
from netlify-plugin-gatsby.
Related Issues (20)
- Test issue
- Background functions HOT 1
- Fix issues with the CI build process HOT 4
- Investigate reducing function .cache folder size by excluding media assets HOT 6
- Update README to include information on adding Background Functions to a site HOT 1
- Issue with linking github organizations HOT 1
- [Bug]: Error when building in netlify HOT 2
- [Bug]: Error: Cannot find module 'common-tags' HOT 6
- [Bug]: netlify build fails with gatsby v5 on node 18 with yarn2 pnp, "Cannot find module 'postcss-color-function'" HOT 1
- [Bug]: Netlify deployment fails with message: "Cannot find module '@gatsbyjs/reach-router/lib/utils'" HOT 3
- [Bug]: Netlify Gatsby plugin causes build failures on Gatsby 2.x site HOT 7
- [Bug] This plugin is running without enabling it HOT 3
- [Bug]: Netlify Gatsby plugin causes build failures on Gatsby 3.4 site HOT 3
- [Test] Verify GitHub workflow HOT 1
- [Bug]: Build has been failing for over a year on live website- only local netlify CLI deploys work HOT 1
- [Bug]: Netlify CI builds failing with error Cannot find module 'common-tags' HOT 2
- [Bug]: Deploying an SSR powered Gatsby app via the Netlify CLI breaks SSR pages HOT 1
- Support gatsby-config.ts
- [Bug]: Image CDN doc has a broken link
- Be more clear that this library is deprecated. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netlify-plugin-gatsby.