'Java overload procesor

I am installed geonetwork 4.0.6 with ElasticSearch in Debian 11. But i have a problem, the Java overload the procesor and i am cannot login to my server through ssh. I am limit Java usage of memory in /etc/default/tomcat9 file config and /etc/elasticsearch/jvm.options. My configs are:

In /etc/default/tomcat9

JAVA_OPTS="-Djava.awt.headless=true  -Xmx6144m -XX:MaxPermSize=1536m -Dfile.encoding=UTF-8"

In /etc/elasticsearch/jvm.options

-Xms2048m
-Xmx2048m


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source