Cant find /etc/default/elasticsearch

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.

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.

/etc/default/elasticsearch is where you define variables for the init file to use.

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?

Hi thanks all, I was able to resolve it by changing ES_MIN_MEM and ES_MIN_MAX in the elasticsearch.in.sh file.