Failing while deploying


Specifically I have one page in gatsby which loads the product details depending on the product id :frowning: eg : /product/:productId). I used getServerData function in gatsby which is used to load data in server to get productId . When using getServerData function then getting error “could not parse from file : HTTP: request body too large
failed to upload file : _ssr”

Hi @deepakkumarwebexcell,

Thanks for reaching out and welcome to Netlify’s Support Forums!

The section of the error that I can see suggest that the deploys are failing because the DSG/SSR function zips are too large.

You have a few different options here for reducing the bundle size:

  1. Reduce the number of DSG/SSR pages on the site
  2. Add the GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE environment variable, which will load the datastore (data.mdb) from the CDN instead of including it in the functions bundle.
  3. You can specifically exclude any large and unnecessary files from the bundle using the included_files syntax detailed here: File-based configuration | Netlify Docs

If you continue to have issues, could you share the link to the deploy that failed or provide the site name (for example sitename.netlify.app).

Hi @Melvin ,
That doesn’t work. Getting error like this


Can you please look into this and help what exactly is causing issue .I tried adding env variable
GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE=true
and in netlify.toml function added
[functions]
node_bundler = “esbuild”.

Although when trying to access the link it is downloading the file

Hi @deepakkumarwebexcell,

I was able to find the site with the Netlify Internal ID that was in the screenshot. Just for the future, it always helps the Support Team to know which site you’re having issues with so we can see the full deploy logs. Now that I can see the site, I see deploys are no longer failing with the issue that you initially reported, so the GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE=true appears to have worked as deploys are successful now.

The issue that you mentioned is now with a serverless function. From the function error it appears that authentication failed from the the 401 unauthorized in the Error message:

Error - Failed to download https://<redacted>/data-a9e74074-bg-etc..mdb: 401 Unauthorized.

You can find the error in the Function log.

The error points to an authentication issue when attempting to access that URL. You’ll want to check the url authentication requirements to download from that URL.

Hi @Melvin ,
GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE=true seems to be working as deploys are not getting failed. But the main concern is with SSR pages. I am trying to build a dynamic SSR page based on productId. Even in getServerData function I am only taking the productId. So the function is quite simple and returning simple output not heavy. Besides SSR page ,all pages are working well for me.
The SSR page is showing the error :“ENOSPC: no space left on device, write getting in gatsby on SSR pages and other pages working fine”.
I searched for this error , its related to memory usage. But I tried clearing my cache memory as well.

Can you please look into this and provide a solution if you can.

Hi @Melvin , Can you please look and suggest. I am stuck into this with no possible solutions which I can implement

Hi @deepakkumarwebexcell,

Could you let us know where you’re seeing the error :“ENOSPC: no space left on device, write getting in gatsby on SSR pages and other pages working fine”.? If you could link to the URL or provide steps to reproduce the issue.