码迷,mamicode.com
首页 > 数据库 > 详细

[转]“WARNING: soft rlimits too low” in MongoDB with Mac OS X

时间:2014-09-25 01:25:07      阅读:4507      评论:0      收藏:0      [点我收藏+]

标签:http   os   ar   for   sp   art   cti   on   c   

转自: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

标签:http   os   ar   for   sp   art   cti   on   c   

原文地址:http://www.cnblogs.com/wbb2109/p/3991721.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!