Case studies
This section offers some real-world problem scenarios and solutions to use Elasticsearch.
Node configuration
You have a five-node production cluster, where each node has 32GB
of total memory and 16GB
is allocated to Elasticsearch. Lately, you've noticed a problem: every couple of days, node-05
leaves the cluster without warning. Restarting Elasticsearch on this node solves the problem temporarily, but the node will drop out of the cluster again in a few days. How do we go about looking into this issue?
The next time this error happens, check the Elasticsearch logs before restarting the node:
tail -n 500 /var/log/elasticsearch/*.log
You notice in the log file that Elasticsearch is throwing an OutOfMemoryError
exception, like the following:
Caused by: java.lang.OutOfMemoryError: Java heap space at org.apache.lucene.store.DataOutput.copyBytes(DataOutput.java:273) at org.apache.lucene.util.fst.FST.<init>(FST.java:342) at org.apache.lucene.util.fst.FST.<...