Idarlington
(Ikenna Darlington)
April 13, 2016, 6:21pm
1
Hello, I cant seem to locate the elasticsearch's file in the /etc/default/ path on our production server.
(ubuntu 14.04)
I need it to change the heap size of of elasticsearch which has been giving the java.lang.OutOfMemoryError: Java heap space error.
Although, there is an elasticsearch conf file in the /etc/init.d/ path. We upgraded sometime ago from elasticsearch 1.7 to 2.0.
neu5ron
(Nate)
April 13, 2016, 7:49pm
2
It should be "/etc/elasticsearch/elasticsearch.yml"
Changing your heap size really depends on the distribution you're running on.
Read through the init script that starts elasticsearch to see if it's sourcing an external file for environment variables that you can customize.
Or, just put a line like this inside your init script at an appropriate spot, setting the "31g" to what you want your heap to be at:
export ES_HEAP_SIZE=31g
The elasticsearch.yml Nate mentioned isn't going to allow you to modify your heap size.
warkolm
(Mark Walkom)
April 13, 2016, 9:19pm
4
/etc/default/elasticsearch
is where you define variables for the init file to use.
Idarlington
(Ikenna Darlington)
April 14, 2016, 8:45am
5
Hi @Ryan_Hadley , thanks , but I have already tried that and it doesn't work when I check through sense GET _nodes/stats
.
Any ideas @warkolm ?
Idarlington
(Ikenna Darlington)
April 14, 2016, 10:20am
6
Hi thanks all, I was able to resolve it by changing ES_MIN_MEM
and ES_MIN_MAX
in the elasticsearch.in.sh file.