빈쿵바라기
좌충우돌 개발자의 기록
빈쿵바라기
전체 방문자
오늘
어제
  • 분류 전체보기 (53)
    • Programming (25)
      • JAVA (12)
      • Spring Boot (6)
      • JPA (7)
      • Python (0)
    • Database (12)
      • RDBMS (4)
      • NoSQL (7)
    • Server (11)
    • Elasticsearch (3)
    • ETC (2)

블로그 메뉴

    공지사항

    인기 글

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    빈쿵바라기

    좌충우돌 개발자의 기록

    [Elasticsearch] maximum shards open 에러
    Elasticsearch

    [Elasticsearch] maximum shards open 에러

    2022. 12. 14. 23:13

    Problem

    기존에 운영중이던 Elasticsearch에 새로운 index를 만드려고 시도하는 중에 아래와 같이 maximum shards open 에러 로그가 출력되었습니다.

    {
    	"type": "validation_exception",
    	"reason": "Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [1000]/[1000] maximum shards open;"
    }

    현재 노드당 최대 shard 개수가 1000개인데, 1000개가 모두 열려 있는 상태에서 새로운 index를 생성하려다가 에러가 발생하였습니다.

    현재 shard 확인

    $ curl -s -XGET localhost:9200/_cat/shards | wc -l
    1000

     

    해결방법

    클러스터의 shard 수를 줄이거나, 아래와 같이 /_cluster/settings 요청을 통해 shard의 최대 개수를 변경하여 해결할 수 있습니다.

    curl -X PUT localhost:9200/_cluster/settings -H "Content-Type: application/json" -d '{ "persistent": { "cluster.max_shards_per_node": "3000" } }'
    $ curl -s -XGET localhost:9200/_cat/shards | wc -l
    3000
    저작자표시 (새창열림)

    'Elasticsearch' 카테고리의 다른 글

    [Elasticsearch] 클러스터 구성하기  (0) 2023.03.09
    [Elasticsearch] 전체 문서 조회 max_result_window 이슈 (Scroll API)  (0) 2022.10.20
      'Elasticsearch' 카테고리의 다른 글
      • [Elasticsearch] 클러스터 구성하기
      • [Elasticsearch] 전체 문서 조회 max_result_window 이슈 (Scroll API)
      빈쿵바라기
      빈쿵바라기
      삽질하는 개발자의 좌충우돌 개발기

      티스토리툴바