From 5e5d9e6c0a5a3c023efbe6bc5cca3f738d3f45b1 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Tue, 27 Oct 2020 12:44:24 -0230 Subject: [PATCH] Set NODE_OPTIONS=--max_old_space_size=1024 for builds (#9731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces the footprint of each Node process in an attempt to try and lower the failure rate. > Expected behavior with –max-old-space-size within container constraints > > By default, Node.js (up to 11.x) uses a maximum heap size of 700MB and 1400MB > on 32-bit and 64-bit platforms, respectively. For current defaults, see the > reference mentioned at the end of blog. [1]:https://developer.ibm.com/languages/node-js/articles/nodejs-memory-management-in-container-environments/ --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 01b0b2827..de5455c9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,6 +122,8 @@ jobs: prep-build: docker: - image: circleci/node@sha256:e16740707de2ebed45c05d507f33ef204902349c7356d720610b5ec6a35d3d88 + environment: + NODE_OPTIONS: --max_old_space_size=1024 steps: - checkout - attach_workspace: @@ -141,6 +143,8 @@ jobs: prep-build-test: docker: - image: circleci/node@sha256:e16740707de2ebed45c05d507f33ef204902349c7356d720610b5ec6a35d3d88 + environment: + NODE_OPTIONS: --max_old_space_size=1024 steps: - checkout - attach_workspace: