elasticSearch启动报错:initial heap size [268435456] not equal to maximum heap size [1073741824]; this can cause resize pauses and prevents mlockall from locking the entire heap

elasticSearch · Fecmall · 于 5年前 发布 · 9770 次阅读

https://github.com/elastic/elasticsearch/issues/18462

To configure the heap size, you need to modify the jvm.options file. This is a new configuration file. There are two lines: -Xms and -Xmx to set the min and max heap size. These values should be equal, and must be equal if you trip the bootstrap checks.

将 jvm.options 中的 -Xms and -Xmx to 设置成相等

譬如docker-compose中的配置

elasticsearch1:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
    restart: always
    container_name: elasticsearch1
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms256m -Xmx256m -XX:+AssumeMP"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 1g
    cap_add:
      - IPC_LOCK
    volumes:
      - esdata1:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    networks:
      - code-network

共收到 0 条回复
没有找到数据。
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics