William Anputra
William Anputra

Reputation: 101

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

i ran on Mac OSX capitan and everytime i run mongo shell, this warning will pop up. i tried:

sudo ulimit -n 1024

ulimit -n 1024

it still doesn't work. any ideas?

Upvotes: 9

Views: 12602

Answers (1)

Qiankun Daniel Xie
Qiankun Daniel Xie

Reputation: 151

You should try to close your terminal and redo it. Or directly try it in your shell which runs mongodb.

  1. Close the running MonogoDB
  2. Run the following bash code:

    sudo launchctl limit maxfiles 65536 65536
    sudo launchctl limit maxproc 2048 2048
    ulimit -n 65536
    ulimit -u 2048
    
  3. Close the terminal or bash and restart.

  4. run ulimit -n in terminal to test if change successfully

Upvotes: 13

Related Questions