Skip to content

Make sure we explicitly specify Xms and Mmx to 1g #34

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

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"sdk": {
"version": "5.0.100"
"version": "5.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}
13 changes: 9 additions & 4 deletions src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ private static StartArguments StartArgs(NodeConfiguration config)

private static Dictionary<string, string> EnvVars(NodeConfiguration config)
{
if (string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath)) return null;
return new Dictionary<string, string>
var environmentVariables = new Dictionary<string, string>
{
{ config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath },
{"ES_HOME", config.FileSystem.ElasticsearchHome}
{"ES_JAVA_OPTS", "-Xms1g -Xmx1g"}
};
if (!string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath))
environmentVariables.Add(config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath);

if (!string.IsNullOrWhiteSpace(config.FileSystem.ElasticsearchHome))
environmentVariables.Add("ES_HOME", config.FileSystem.ElasticsearchHome);

return environmentVariables;
}

/// <summary>
Expand Down