转自: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的更多相关文章

  1. mongodb 启动 WARNING: soft rlimits too low, transparent_hugepage/enabled is 'always'. never

    今天启动mongodb的时候,之前一直没注意,今天发现又warning,想整一整. 下面是告警 2019-09-05T12:00:55.271+0800 I CONTROL [initandliste ...

  2. mongodb 安装后 出现警告:** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000

    警告问题:当前mongodb 支持的最大文件数有256个,但是推荐至少1024个. 解决办法: 1.关闭现在打开的mongodb 终端窗口 2.重新打开终端并运行一下命令: sudo launchct ...

  3. [整理]EABI和OABI【转】

    本文转载自:https://www.crifan.com/order_eabi_and_oabi/ 1.什么是ABIABI,application binary interface (ABI),应用程 ...

  4. [caffe]linux下安装caffe(无cuda)以及python接口

    昨天在mac上折腾了一天都没有安装成功,晚上在mac上装了一个ParallelDesktop虚拟机,然后装了linux,十分钟就安装好了,我也是醉了=.= 主要过程稍微记录一下: 1.安装BLAS s ...

  5. [Swift]基础

    [Swift]基础 一, 常用变量 var str = "Hello, playground" //变量 let str1="Hello xmj112288" ...

  6. [Ruby on Rails系列]4、专题:Rails应用的国际化[i18n]

    1. 什么是internationalization(i18n)? 国际化,英文简称i18n,按照维基百科的定义:国际化是指在设计软件,将软件与特定语言及地区脱钩的过程.当软件被移植到不同的语言及地区 ...

  7. [译]一个灵活的 Trello 敏捷工作流

    [译]一个灵活的 Trello 敏捷工作流 翻译自 An Agile Trello Workflow That Keeps Tasks Flexible Getting things done 可不只 ...

  8. iOS10收集IDFA,植入第三方广告[终结]--ADMob

    [PS: 前段时间,公司做ASO推广,需要在应用中收集IDFA值,跟广告平台做交互!于是有了这个需求--] 1.首先,考虑了一下情况(自己懒 -_-#),就直接在首页上写了一个Banner,循环加载广 ...

  9. [ Alcatraz ]管理Xcode插件

    [ Alcatraz 配置 ] 1.包管理器在线安装 Terminal终端 $ curl -fsSL https://raw.githubusercontent.com/supermarin/Alca ...

随机推荐

  1. VMWare EXSi 添加新磁盘时 报错 HostStorageSystem.ComputeDiskPartitionInfo 的处理

    给 VMWare EXSi 添加新磁盘时报错 : Call "HostStorageSystem.ComputeDiskPartitionInfo" for object &quo ...

  2. 圆形DIV

    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" ...

  3. RegExp.exec和String.match深入理解

    今天在重新阅读<JavaScript权威指南>的RegExp和String的时候,看到了2个比较容易混淆的函数:RegExp的exec和String的match 这2个函数都是从指定的字符 ...

  4. ZOJ 1111 Poker Hands

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1111 A poker hand consists of 5 ca ...

  5. 初用Spring Test

    粗糙的研究了下Spring test,分享以下blog: 1. http://blog.csdn.net/shan9liang/article/details/40452469 2. http://w ...

  6. 项目分析 NGPcontext

    NGPcontext 之前对这个一直很疑惑,我一直认为只是在机器人方面有用处,但很有疑问,正在做这方面,我想好好看看到底是怎么运行的 bool NGP::init(NGPcontext context ...

  7. asp.net中实现群发邮件功能

    前段时间在帮老师开发的网站中需要用到一个群发邮件的功能,而自己之前学习cms系统的时候用的we7的群发邮件功能也有一些问题,于是乎便自己去网上查了一下资料,自己总结了一下,并且封装成了一个类,亲测有用 ...

  8. Redis杂记

    参考资料: Redis 教程 | 菜鸟教程 : http://www.runoob.com/redis/redis-tutorial.html Redis快速入门 :http://www.yiibai ...

  9. JavaScript之match()方法讲解

    定义和用法 match() 方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配. 该方法类似 indexOf() 和 lastIndexOf(),但是它返回指定的值,而不是字符串的位置. ...

  10. bootstrap学习记录(慕课网教程)

    1.当主标题下需要副标题时可在h中嵌套small<h1>nihao<small>a</samll></h1> 2.当某一段落需要突出显示时可添加lead ...