首页 > 代码库 > [转]“WARNING: soft rlimits too low” in MongoDB with Mac OS X
[转]“WARNING: soft rlimits too low” in MongoDB with Mac OS X
转自:Programming and Technology
If you get this warning when you connect to mongo shell in Mac OX X:
** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
A simple way to fix this is setting the limit just before starting mongod
with this:
ulimit -n 1024 && mongod
Or this:
launchctl limit maxfiles 1024 1024
But if you are running mongo in a development environment this shouldn’t be a problem, you can just ignore it.
This is a temporary and not very pretty fix. To make this permanent you have to add this to the/etc/launchd.conf
file:
launchctl limit maxfiles 1024 1024
Now reboot to make changes effective.
You can see the actual values of the limits running this:
$ launchctl limit maxfiles maxfiles 1024 1024
Remember to restart your mongod
process every time you change any value to see if it works.
[转]“WARNING: soft rlimits too low” in MongoDB with Mac OS X
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。