My ES keeps crashing due to Java running out of memory in regards to the Java heap.
It was set with the default, which I believe was 1 GB. I checked the setting in /etc/sysconfig/elasticsearch to be 8 GB. I’ve restarted ES as well as restarted the VM. But when I check on the status of the Graylog service it still shows that it started with 1 GB:
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2017-03-07 14:12:45 EST; 23min ago
Process: 866 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 870 (java)
└─870 /bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX…
Isn’t the -Xmx1g flag indicating that it has a max heap size of 1 GB? Or am I not understanding that correctly?