Ask questionsCircleCI build Error: spawn ENOMEM
<!-- Please fill out each section below, otherwise your issue will be closed. This info allows Gatsby maintainers to diagnose (and fix!) your issue as quickly as possible.
Useful Links:
Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues -->
CircleCI builds failed with the following error:
Error: spawn ENOMEM
- child_process.js:372 ChildProcess.spawn
internal/child_process.js:372:11
- worker.js:80 exports.default._initialize
[src]/[jest-worker]/build/worker.js:80:69
- worker.js:206 exports.default._exit
[src]/[jest-worker]/build/worker.js:206:12
- child_process.js:254 Process.ChildProcess._handle.onexit
internal/child_process.js:254:12
Slightly modify f74d723f037ca55068b456dc808ee3dd8ec563cc and send new pull request.
Gatsby build should pass
Build is not passing
System: OS: Linux 4.15 Debian GNU/Linux 9 (stretch) 9 (stretch) CPU: (36) x64 Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz Shell: 4.4.12 - /bin/bash Binaries: Node: 11.5.0 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Languages: Python: 2.7.13 - /usr/bin/python npmPackages: gatsby: ^2.3.31 => 2.3.31 gatsby-image: ^2.0.37 => 2.0.37 gatsby-paginate: ^1.0.17 => 1.0.17 gatsby-plugin-catch-links: ^2.0.13 => 2.0.13 gatsby-plugin-favicon: ^3.1.6 => 3.1.6 gatsby-plugin-google-tagmanager: ^2.0.12 => 2.0.12 gatsby-plugin-manifest: ^2.0.26 => 2.0.26 gatsby-plugin-netlify: ^2.0.16 => 2.0.16 gatsby-plugin-offline: ^2.1.0 => 2.1.0 gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12 gatsby-plugin-sentry: ^1.0.1 => 1.0.1 gatsby-plugin-sharp: ^2.0.32 => 2.0.32 gatsby-plugin-sitemap: ^2.0.11 => 2.0.11 gatsby-plugin-typography: ^2.2.10 => 2.2.10 gatsby-remark-images: ^3.0.10 => 3.0.10 gatsby-remark-prismjs: ^3.2.7 => 3.2.7 gatsby-source-filesystem: ^2.0.28 => 2.0.28 gatsby-transformer-json: ^2.1.11 => 2.1.11 gatsby-transformer-remark: ^2.3.8 => 2.3.8 gatsby-transformer-sharp: ^2.1.17 => 2.1.17
Answer questions
andreivmaksimov
@pieh, thanks for advice, but it was not helpful (https://circleci.com/gh/hands-on-cloud/hands-on.cloud/23). I've already tried to play with GATSBY_CPU_COUNT={1,2} and --max-old-space-size={1024,2048,4096}.
I've also tried to use Node 12.2.0. Still getting this error.
This generate images part of deployment is crucial part of whole framework. With each blog post deployment it takes more resources because of growing images count. Right now I have 20 posts and 160 images with mean size 250k. Probably we have memory leak somewhere, but I'm not strong Node dev yet to prove\fix it by myself.
Related questions