3

This question is already on Elasticsearch forums: Elastic Forum

I am new to Elasticsearch. I use one installation on my server with version 6.8.5 for a Magento 2 instance I have. I am using java-8-openjdk openjdk version "1.8.0_222". Although it, not the first time I use the same setup now in my last scenario I have the high load in CPUs with was not there before. In peak, it goes up to 4.00 with htop saying JAVA 400% CPU.

HTOP

jvm options:

-Xms15g

-Xmx15g

-XX:+UseConcMarkSweepGC

-XX:CMSInitiatingOccupancyFraction=75

-XX:+UseCMSInitiatingOccupancyOnly

-Des.networkaddress.cache.ttl=60

-Des.networkaddress.cache.negative.ttl=10

-XX:+AlwaysPreTouch

-Xss1m

-Djava.awt.headless=true

-Dfile.encoding=UTF-8

-Djna.nosys=true

-XX:-OmitStackTraceInFastThrow

-Dio.netty.noUnsafe=true

-Dio.netty.noKeySetOptimization=true

-Dio.netty.recycler.maxCapacityPerThread=0

-Dlog4j.shutdownHookEnabled=false

-Dlog4j2.disable.jmx=true

-Djava.io.tmpdir=${ES_TMPDIR}

-XX:+HeapDumpOnOutOfMemoryError

-XX:HeapDumpPath=/var/lib/elasticsearch

-XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log 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

9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m

9-:-Djava.locale.providers=COMPAT 10-:-XX:UseAVX=2

And elasticsearch.yml:

indices.query.bool.max_clause_count: 10024

I have specified JAVA_HOME as elastic advice and I have no errors anywhere.

Maybe I should use other JDK versions?

If someone could help me, please.

Thank you

2
  • Did you ever find a solution to this? We have a memory problem mainly as elasticsearch seems to eat all the memory with same kind of processes as you have in your screenshot.
    – Webninja
    Mar 23, 2020 at 11:25
  • Try to remove the redirect to search for 404 errors....Also what module you use?
    – G. G.
    Mar 23, 2020 at 16:55

2 Answers 2

0

actually you can just restart Elasticsearch with following command

sudo service elacticsearch restart

0

This worked for me.

I tried changing ES_HEAP_SIZE in /etc/default/elasticsearch and in /etc/init.d/elasticsearch, but when I ran ps aux | grep elasticsearch the output still showed:

/usr/bin/java -Xms2g -Xmx2g # aka 2G min and max ram

This Is second option if first not work then try this one.

I had to make these changes in:

/etc/elasticsearch/jvm.options

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

-Xms1g 
-Xmx1g 
# the settings shipped with ES 5 were: -Xms2g
# the settings shipped with ES 5 were: -Xmx2g

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.