Assuming Elasticsearch is the only thing running on the host it is recommended you give no more than 50% of available memory to the heap. You seem to have relatively little data in the cluster so it is surprising you are experiencing OOM.
What kind of workload is the cluster under?
Do you have any non-default cluster or index settings in place?
We tried to allocate only 50% of server capacity, but OOM error frequency is height, if I allocate more memory then it will reduce displaying OOM frequency
What kind of workload is the cluster under?
It is very Minimal workload, you can consider 2 to 3L data/day.
Do you have any non-default cluster or index settings in place?
No, I don't have any non-default cluster or index setting.
Index setting as follows:
{"settings":
{"index":{"creation_date":"1560427000684","
number_of_shards":"1",
"number_of_replicas":"1",
"uuid":"*************",
"version":{"created":"7010099","upgraded":"7060299"},
"provided_name":"********"}}}
Do you have any third-party plugins installed?
No, we don't have any third-party plugins installed.
Is there anything else running on that host?
yes, we have Web application hosted in the same server, but that Utilization is minimal.
Recently we modified only Xms and Xmx in JVM.options
JVM.options as follows
##JVM configuration## #Xmx represents the maximum size of total heap space
-Xms20g
-Xmx20g #GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=100
8-13:-XX:+UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC
14-:-XX:G1ReservePercent=25
14-:-XX:InitiatingHeapOccupancyPercent=30 #JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR}
##heap dumps #generate a heap dump when an allocation from the Java heap fails #heap dumps are created in the working directory of the JVM
-XX:+HeapDumpOnOutOfMemoryError #specify an alternative path for heap dumps; ensure the directory exists and #has sufficient space
-XX:HeapDumpPath=/var/lib/elasticsearch #specify an alternative path for JVM fatal error logs
-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
##JDK 8 GC logging
8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:/var/log/elasticsearch/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m #JDK 9+ GC logging
9-:Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.