05-02 06:32
Notice
Recent Posts
Recent Comments
관리 메뉴

Scientific Computing & Data Science

[MongoDB] Tips / "WARNING: soft rlimits too low. Number of files is 256, should be at least 1000" 메시지 출력 시 대응방법 본문

Data Science/MongoDB

[MongoDB] Tips / "WARNING: soft rlimits too low. Number of files is 256, should be at least 1000" 메시지 출력 시 대응방법

cinema4dr12 2014. 3. 25. 16:50

by Geol Choi | 


Mac에서 MongoDB 서버를 실행 후, 커맨드라인 도구로 진입할 때 다음과 같은 메시지가 출력될 경우가 있다:

"WARNING: soft rlimits too low. Number of files is 256, should be at least 1000"


$ mongo
MongoDB shell version: 2.4.9
connecting to: test
Server has startup warnings: 
Tue Mar 25 16:33:41.942 [initandlisten] 
Tue Mar 25 16:33:41.942 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000


Linux 계열에서 프로세스 당 파일 수를 제한한 것이다.

이 경고를 해제하려면 서버 셧다운 후 다음과 같이 "ulimit" 명령을 사용하여 프로세스 당 파일 수를 늘리도록 한다:


$ ulimit -n 2048


꼭 2048은 아니어도 상관없으나, 앞서 경고 메시지가 제시하는 것처럼 최소 1000 이상으로 할당하여야 한다.

이제 MongoDB 서버를 실행해 보자. 이 경고 메시지가 더 이상 나오지 않을 것이다.

Comments