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

Fix memory usage in ES #169

Merged
merged 3 commits into from
Jun 11, 2020
Merged

Fix memory usage in ES #169

merged 3 commits into from
Jun 11, 2020

Conversation

rmccue
Copy link
Member

@rmccue rmccue commented Jun 11, 2020

Fixes #115.

#44 added a new environment option, which overrode the existing one where we set the memory limit for Java. This meant that Java was trying to use more memory than the container was actually allocated, getting it killed by the OOM killer.

Additionally, because the config sets network.host, ES switches into production mode. Notably, this turns the bootstrap checks from warnings into exceptions, which means that ES doesn't launch due to the low vm.max_map_count value. To switch it back into development mode, we need to change the discovery type back to single node (which is another env var we can set here).

All up, this should fix the ES memory problems and other related startup problems; it should also now not be necessary to increase Docker's memory limit.

rmccue added 3 commits June 11, 2020 15:19
This was mistakenly ignoring the first block, which meant ES was using
its default of 1GB of memory regardless of the setting for 512MB.
@rmccue rmccue requested review from roborourke and joehoyle June 11, 2020 14:29
Copy link
Contributor

@kadamwhite kadamwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does indeed seem to fix things for me! Excellent work, @rmccue, this is fantastic news.

Is there any sort of YAML linter that would detect duplicate keys, I wonder?

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work man, and good catch on the duped field

@roborourke roborourke merged commit 52be09b into master Jun 11, 2020
@roborourke roborourke deleted the fix-memory-usage branch June 11, 2020 15:30
@roborourke
Copy link
Contributor

Now available in version 3.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elasticsearch memory limit
3 participants