From e30220f04c517c17d3cc026b23493f827643166f Mon Sep 17 00:00:00 2001 From: Joel Griffith Date: Tue, 18 Aug 2020 08:24:53 -0700 Subject: [PATCH] Small README note on bumping memory for builds (#75247) --- src/dev/build/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/dev/build/README.md b/src/dev/build/README.md index 460ab0179433..f6e11af67da3 100644 --- a/src/dev/build/README.md +++ b/src/dev/build/README.md @@ -16,6 +16,16 @@ node scripts/build --release node scripts/build --skip-node-download --debug --no-oss ``` +# Fixing out of memory issues + +Building Kibana and its distributables can take a lot of memory to finish successfully. Builds do make use of child processes, which means you can increase the amount of memory available by specifying `NODE_OPTIONS="--max-old-space-size=VALUE-IN-MEGABYTES"`. + +```sh + +# Use 4GB instead of the standard 1GB for building +NODE_OPTIONS="--max-old-space-size=4096" node scripts/build --release +``` + # Structure The majority of this logic is extracted from the grunt build that has existed forever, and is designed to maintain the general structure grunt provides including tasks and config. The [build_distributables.js] file defines which tasks are run.