Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

ElasticSearch Error – this can cause resize pauses and prevents mlockall from locking the entire heap

Error Message

[ec2-user@es-data01 bin]$ OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
ERROR: [1] bootstrap checks failed
[1]: initial heap size [1048576000] not equal to maximum heap size [2097152000]; this can cause resize pauses and prevents mlockall from locking the entire heap
ERROR: Elasticsearch did not exit normally - check the logs at /home/ec2-user/elasticsearch-7.6.0/logs/devopsschool.log

Solutions

Setting the parameter -Xms to the same value of -Xmx in /etc/elasticsearch/jvm.options solved the problem 🙂 Thanks

export ES_HEAP_SIZE=2024m
echo $ES_HEAP_SIZE
export ES_JAVA_OPTS="-Xms1000m -Xmx2000m" /home/ec2-user/elasticsearch-7.6.0/bin/elasticsearch

$ cd /home/ec2-user/elasticsearch-7.6.0/config
$ vi jvm.options # Make -Xmx1g to -Xmx1g
$ more /home/ec2-user/elasticsearch-7.6.0/config/jvm.options | grep Xm
CLIENT
.........
-Xms1g
-Xmx1g

Master
........
-Xms2g
-Xmx2g

DATA
.......
-Xms1g
-Xmx1g
DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.