Explicitly set Elasticsearch heap size during CI and local development (#86513) (#86573)

This commit is contained in:
Brian Seeders 2020-12-18 19:56:24 -05:00 committed by GitHub
parent 2ab980a9b6
commit 5ec653f170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {