ElasticSearch Out Of Memory ElasticSearch Out Of Memory elasticsearch elasticsearch

ElasticSearch Out Of Memory


As this seems to be Heap Space issue, make sure you have sufficient memory. Read this blog about Heap sizing.

As you have 4GB RAM assign half of it to Elasticsearch heap. Run export ES_HEAP_SIZE=2g. Also lock the memory for JVM, uncomment bootstrap.mlockall: true in your config file.

Another important thing here is if you have only 30 small articles, how is your data folder 26GB in size? How many indexes you have, run GET _cat/indices to check which index is taking that much space. Run GET /_nodes/stats to see detailed info about node, you might be able to figure out what is the issue. One more thing, if you are using marvel plugin, then marvel indices are pretty huge and you need to delete them to free disk space.

Tweaking indices.fieddata.cache.size is not a solution for lack of memory. From the Docs

This setting is a safeguard, not a solution for insufficient memory.

If you don’t have enough memory to keep your fielddata resident in memory, Elasticsearch will constantly have to reload data from disk, and evict other data to make space. Evictions cause heavy disk I/O and generate a large amount of garbage in memory, which must be garbage collected later on.

Hope this helps!!