Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

** 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?

like image 322
William Anputra Avatar asked Jan 31 '16 05:01

William Anputra


1 Answers

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
like image 179
Qiankun Daniel Xie Avatar answered Oct 25 '22 14:10

Qiankun Daniel Xie