Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch shuts down automatically - Ubuntu

I am using a VM instance running Ubuntu (1GB RAM + 25GB Harddisk) with Elasticsearch on it. Although I have managed to install the elasticsearch on it when i start the service via sudo service elasticsearch start the ES service starts and then stops after few seconds. Throwing following error enter image description here

TIA


1 Answers

In my case, ElasticSearch was shutting down due to a lack of memory.

As in my VPS I only have 2G and I can't use swap, I changed my /etc/elasticsearch/jvm.options to use 300Mb instead of 1G..

-Xms300m
-Xmx300m

Just restart the service after changing it, and you shoud be good (for a while). :)

like image 86
Ricardo Martins Avatar answered Jan 03 '26 12:01

Ricardo Martins



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!