转自:Programming and Technology

If you get this warning when you connect to mongo shell in Mac OX X:

  1. ** 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:

  1. ulimit -n 1024 && mongod

Or this:

  1. 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:

  1. launchctl limit maxfiles 1024 1024

Now reboot to make changes effective.

You can see the actual values of the limits running this:

  1. $ launchctl limit maxfiles
  2. 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. Python科学计算(一)环境简介——Anaconda Python

    Anaconda Python 是 Python 科学技术包的合集,功能和 Python(x,y) 类似.它是新起之秀,已更新多次了.包管理使用 conda,GUI基于 PySide,所有的包基本上都 ...

  2. 深入探讨Java类加载机制

    一.前言 毕业至今,已经三年光景,平时基本接触不到关于类加载器的技术(工作上),相信很多同行在开始工作后很长一段时间,对于类的加载机制都没有深入的了解过,之前偶然的机会接触了相关的知识,感觉挺有意思, ...

  3. Yandex.Algorithm 2011 Round 1 D. Sum of Medians 线段树

    题目链接: Sum of Medians Time Limit:3000MSMemory Limit:262144KB 问题描述 In one well-known algorithm of find ...

  4. 【BZOJ】【2084】【POI2010】Antisymmetry

    Manacher算法 啊……Manacher修改一下就好啦~蛮水的…… Manacher原本是找首尾相同的子串,即回文串,我们这里是要找对应位置不同的“反回文串”(反对称?233) 长度为奇数的肯定不 ...

  5. offsetParent、offsetTop、offsetLeft、offsetWidth、offsetHeight

    w3c规范,请戳这里:http://www.w3.org/TR/cssom-view/#dom-htmlelement-offsetparent 一.offsetParent 英文解读: part o ...

  6. Python中的正则表达式regular expression

    1 match = re.search(pat,str)  If the search is successful, search() returns a match object or None o ...

  7. css hack一览

    浏览器对css hack的支持情况

  8. javascript 最常用的技巧整理

    1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键<table border oncontextmenu= ...

  9. 如何做到尽可能不使用庞大的jQuery

    jQuery 是现在最流行的 JavaScript 工具库. 据统计,目前全世界 57.3% 的网站使用它.也就是说,10 个网站里面,有 6 个使用 jQuery.如果只考察使用工具库的网站,这个比 ...

  10. IE6下div遮盖select的最优解决方案

    a.本节精选html5/css频道里一款IE6下div遮盖select的最优解决方案 原理:利用iframe来遮挡select,再用div来遮挡iframe,就这么简单. 1)首先,建一个div层和i ...