mongodb : Increasing max connections in mongodb

前端 未结 5 1049
名媛妹妹
名媛妹妹 2020-12-03 21:52

i need your help in solving this

this is the result of my ulimit -a on my linux server

   core file size          (blocks, -c) 0
schedu         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 21:55

    It seems MongoDB has no limit on incoming connections and you should modify system-wide limit, see official doc:

    Unless constrained by system-wide limits, MongoDB has no limit on incoming connections. On Unix-based systems, you can modify system limits using the ulimit command, or by editing your system’s /etc/sysctl file. See UNIX ulimit Settings for more information.

    Recommended ulimit Settings(offical doc):

    -f (file size): unlimited

    -t (cpu time): unlimited

    -v (virtual memory): unlimited

    -n (open files): 64000

    -m (memory size): unlimited

    -u (processes/threads): 64000

    Remember to restart your mongod and mongos instances after changing the ulimit settings to ensure that the changes take effect.

    Source: number-of-connections recommended-ulimit-settings

提交回复
热议问题