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.


jvm options:






















-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-:-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

  • 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


actually you can just restart Elasticsearch with following command

sudo service elacticsearch restart


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:


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

# 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.