Skip to content

Commit

Permalink
Explicitly set Elasticsearch heap size during CI and local development (
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Dec 18, 2020
1 parent 1723328 commit aeb9e1d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/kbn-es/src/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@ exports.Cluster = class Cluster {

this._log.debug('%s %s', ES_BIN, args.join(' '));

options.esEnvVars = options.esEnvVars || {};

// ES now automatically sets heap size to 50% of the machine's available memory
// so we need to set it to a smaller size for local dev and CI
// especially because we currently run many instances of ES on the same machine during CI
options.esEnvVars.ES_JAVA_OPTS =
(options.esEnvVars.ES_JAVA_OPTS ? `${options.esEnvVars.ES_JAVA_OPTS} ` : '') +
'-Xms1g -Xmx1g';

this._process = execa(ES_BIN, args, {
cwd: installPath,
env: {
Expand Down

0 comments on commit aeb9e1d

Please sign in to comment.