Giter Site home page Giter Site logo

Comments (9)

ascorbic avatar ascorbic commented on June 10, 2024 3

OK, thanks for the detail. I'm working on the plugin right now, so wil be looking into that too

from netlify-plugin-gatsby.

ascorbic avatar ascorbic commented on June 10, 2024 2

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.

shameer-rahman avatar shameer-rahman commented on June 10, 2024

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.

wutangpaul avatar wutangpaul commented on June 10, 2024

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.

chrisq21 avatar chrisq21 commented on June 10, 2024

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.

chrisq21 avatar chrisq21 commented on June 10, 2024

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.

ascorbic avatar ascorbic commented on June 10, 2024

Hi. Are you able to see what the large files are in the zip?

from netlify-plugin-gatsby.

chrisq21 avatar chrisq21 commented on June 10, 2024

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).

Screen Shot 2022-01-20 at 5 17 17 PM

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.

shameer-rahman avatar shameer-rahman commented on June 10, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.