Elastic search consuming so much Memory

I have an EC2 instance having 32 GB RAM and I am using Django Elasticsearch DSL to use elastic search in Django for searching in Model objects. I have containerized the elastic search server.
Below is the code from the docker YAML file to build the image.

    image: elasticsearch:7.12.1
    container_name: zinia-backend-elasticsearch
      - "9300:9300"
      - "9200:9200"
      discovery.type: "single-node"
    restart: unless-stopped
      - backend

But currently, I am facing the issue of high memory consumption by elastic search it is taking up to 16.5 GB of memory, and when other containers need more ram the system runs out of memory and stops responding and this becomes a critical issue for our team and project. Please, someone guide the way to control it.
Thanks in advance.

Welcome to our community! :smiley:

By default Elasticsearch will use half of the system memory available to it - Important Elasticsearch configuration | Elasticsearch Guide [7.13] | Elastic

If that is not what you want then you will need to configure it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.