问题
I am having trouble in installing the Elasticsearch on my live webserver. I have terminal access. I downloaded the elasticsearch on my root directory (public_html) and extracted it as per elastic documnents.
When on terminal i try to run elasticsearch i get the following error
Kindly let me know what can i do and what is the right way to install and run elastic search on the live web server.
Thank You
回答1:
This is not because of disk storage, it's because of less RAM available in your system and by default as stated in this Elastic doc.
By default, Elasticsearch tells the JVM to use a heap with a minimum and maximum size of 1 GB. When moving to production, it is important to configure heap size to ensure that Elasticsearch has enough heap available.
So, Looks like there is very less RAM(memory) available in your system, which is leading to very less heap available for Elasticsearch process which in turn causing OOM error.
Solution:
First check the available RAM(memory) of your server by using below command, which will show the total and available RAM in GB.
free -g
The output of the above command will look like
total used free shared buff/cache available
Mem: 1 0 1 0 0 1
Swap: 0 0 0
Make sure at least, you have a total of 1 GB of RAM available for Elasticsearch process and then restart, it should work.
来源:https://stackoverflow.com/questions/61021999/cant-run-elasticsearch-on-cpanel-linux