나를 위한 기록들

MongoDB ERROR - Sort operation used more than the maximum 33554432 bytes of RAM 본문

데이터베이스/mongodb

MongoDB ERROR - Sort operation used more than the maximum 33554432 bytes of RAM

lyasee 2019. 9. 15. 13:11

mongodb sort 작업이 32MB 메모리 이상을 사용하는 경우 나는 오류

해결 방법

  1. 인덱스 추가 (unique)
  2. 더 작게 limit 걸기
  3. internalQueryExecMaxBlockingSortBytes 를 이용하여 버퍼 크기 조정

3번 방법을 이용하여 128MB 로 설정하기

> db.adminCommand({"setParameter": 1, "internalQueryExecMaxBlockingSortBytes" : 134217728})
Comments