新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
MongDB启动警告 ”WARNING: soft rlimits too low.“问题的解决方法,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
创新互联建站服务项目包括龙子湖网站建设、龙子湖网站制作、龙子湖网页制作以及龙子湖网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,龙子湖网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到龙子湖省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!
MongoDB 3.4启动的时候有如下告警:
# mongo
MongoDB shell version v3.4.13
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.13
Server has startup warnings:
2018-02-27T15:03:18.518+0800 I STORAGE [initandlisten]
2018-02-27T15:03:18.518+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-02-27T15:03:18.518+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten]
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten]
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten]
2018-02-27T15:03:19.055+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 4096 processes, 65536 files. Number of processes should be at least 32768 : 0.5 times number of files.
查看系统限制:
# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 192979
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 4096
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
解决方法:
可以直接在当前shell中设置:ulimit -n
例如:
ulimit -f unlimited
ulimit -t unlimited
ulimit -v unlimited
ulimit -n 64000
ulimit -m unlimited
ulimit -u 64000
永久生效,需要写入到/etc/profile
改完后需要重启 mongod服务
>use admin
>db.shutdownServer()
关于MongDB启动警告 ”WARNING: soft rlimits too low.“问题的解决方法问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注创新互联行业资讯频道了解更多相关知识。