Skip to content
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

Plugin Causes Failed Netlify Deploy Due To Vast Memory Use #40

Open
Undistraction opened this issue Aug 3, 2018 · 3 comments
Open

Plugin Causes Failed Netlify Deploy Due To Vast Memory Use #40

Undistraction opened this issue Aug 3, 2018 · 3 comments
Assignees

Comments

@Undistraction
Copy link

Undistraction commented Aug 3, 2018

Using this plugin when deploying to Netlify results in the build failing due to the plugin using a huge amount of memory.

In Netlify's deploy logs you will see:

11:41:18 AM: success Building production JavaScript bundles — 5.091 s
11:41:56 AM: /usr/local/bin/build: line 32:  1737 Killed                  gatsby build

After working through this problem with Netlify's support who explained the app is being killed due to one of the plugins using vast amounts of memory, I've removed everything from my Gatsby project bit by bit until only this plugin is left.

I've created a minimum example which you can find here. As you will see there is literally nothing else in the project other than a layout, a simple page and this plugin. .

Just add the repo to Netlify and push. You will see the build fail.

  • gatsby-plugin-favicon 2.1.1
  • gatsby 1.9.128
@Undistraction Undistraction changed the title Plugin Causes Failed Netlify Deploy Due To Memory Use Plugin Causes Failed Netlify Deploy Due To Vast Memory Use Aug 3, 2018
@kekami
Copy link

kekami commented Aug 9, 2018

I just went through the same ordeal and can confirm that it was gatsby-plugin-favicon v2.1.1 that caused Netlify to kill the build process.

@Undistraction
Copy link
Author

@kekami Yep. Ordeal is the right word. Lost a lot of time on this one. It was the first time I've used Netlify and was surprised how poor the debugging is. They said they had had problems with this plugin before, but looks like nobody had opened an issue. I've yet to try this in a V2 app, but I expect the same problem.

@julien1619
Copy link
Member

Thanks for the report! I checked in the underlying plugin and it seems that it's loading ALL the thumbnails in RAM before writing it to the filesystem. I'll investigate on how to fix it.

In the meantime you can try one of the following:

  • Enable favicons only, disable the others (android, appleIcon, ...).
  • Disable the whole plugin and test gatsby-plugin-manifest (be warned, it will generate a PWA manifest, not only favicons).
  • Don't use Netlify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants