Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.11] Explicitly set Elasticsearch heap size during CI and local development (#86513) #86575

Merged
merged 1 commit into from
Dec 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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