Cant Run Elasticsearch on cpanel (Linux)

冷暖自知 提交于 2021-01-29 05:43:34

问题


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:

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!