New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch fails for memory related causes #19
Comments
Next try I got this:
|
Ah, ok. Maybe this is more about how the docker setup was done than the uwazi-docker itself, but lets go a bit deeper on this.
As reference, a example of $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9a9f7463ad0e uwazi-docker_uwazi "/docker-entrypoint.…" 25 hours ago Up 25 hours 0.0.0.0:3000->3000/tcp uwazi-docker_uwazi_1
f23f72e4688b docker.elastic.co/elasticsearch/elasticsearch:5.5.3 "elasticsearch -Expa…" 26 hours ago Up 26 hours 0.0.0.0:9200->9200/tcp, 9300/tcp uwazi-docker_elasticsearch_1
c4db72421df0 mongo:3.4 "docker-entrypoint.s…" 26 hours ago Up 26 hours 0.0.0.0:27017->27017/tcp uwazi-docker_mongo_1
``' |
Trying again, now halfway through a docker course on Udemy. |
So the issue is still there, and docker ps shows that the elasticsearch container is somehow stuck in a state of restarting. That's why the elasticsearch engine can't be contacted. but first, here is the output of docker container ls jr@erwin:~$ docker container ls |
actually, in the logs it looks like java is complaining a lot about too little memory [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] Not sure if any parameter can be added to the docker-compose.yaml to fix this, or if would be possible to have an elasticsearch container with oracle's java instead. I know it is proprietary, but it behaves much better, especially with reagards to memory. |
well, it seems this is the issue docker-library/elasticsearch#111 Only, what to do about it? In my experience oracle java behaves much better than openjdk when it comes to memory, but that's proprietary |
For now, how I got around it was by
from the elasticsearch command line. Not sure what side effects this has, but this at least made elasticsearch run |
@vasyugan can you please give more info about where are you running the docker? I mean, in special how much memory have and operational system. And yes, ElasticSearch is specially complicated. I'm not sure if when I tested (outside of my machine, that have 16GB ram) some of these configurations where made for allow run with the minimum memory by default. But even if no change is need, at least we could document this behavior. |
Am 16.10.2018 um 05:12 schrieb Emerson Rocha Luiz:
@vasyugan <https://github.com/vasyugan> can you please give more info
about where are you running the docker? I mean, in special how much
memory have and operational system.
And yes, ElasticSearch is specially complicated. I'm not sure if when
I tested (outside of my machine, that have 16GB ram) some of these
configurations where made for allow run with the minimum memory by
default. But even if no change is need, at least we could document
this behavior.
I have tested it in two environments, a laptop running Debian buster
with 16 Gb RAM and an Ubuntu server with 40 Gbyte RAM. On both, the
non-dockerized version runs just fine. (Also, I have run the
non-dockerized version with Oracle Java in a Virtualbox VM with just 4
GB RAM.
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADKOOP7bnF00qmGWToVvLLRI2whpKTf_ks5ulU6TgaJpZM4XafBX>.
|
I'm testing remove the About the "vm.max_map_count=262144" part, maybe just document this in some place. As reference here the documentation on this topic https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docker.html#docker-cli-run-prod-mode. |
Ah, @vasyugan, since you have way more RAM (to a point of really deploy everything in one or more cluster) depending of changes we just make one aditional file (instead of changing the default one) as specified here https://docs.docker.com/compose/production/. The final file does not need to be perfect, but at least could be a better baseline for later. At least for MongoDB and ElasticSearch is possible to find recommended configurations to run as production with these DBs in cluster. |
The Please if problems persists, we or reopen this issue or we open a new one and, if relevant, mention this one |
The text was updated successfully, but these errors were encountered: