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
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 <value>
例如:
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()
# 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
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 <value>
例如:
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()
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2151324/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決警告“ld: warning: directory not found for option”
- Ubuntu 解決 Too many open files 問題Ubuntu
- oracle監聽啟動時報TNS-00507問題解決一例Oracle
- rails 5.2 啟動警告 warning: previous definition of VERSION was here和bootsnapAIboot
- 解決ASM無法啟動問題ASM
- hbase啟動失敗問題解決
- mongodb啟動失敗問題解決MongoDB
- DRM引起的問題解決一例
- Redis 3.2.1從庫啟動報錯"Error condition on socket for SYNC"問題解決一例RedisError
- gunzip時,提示file too large(問題已解決)
- Mysql中too many connections問題的解決MySql
- keepalived啟動報錯解決一例
- 啟動Amoeba報The stack size specified is too small解決方法
- Linux啟動問題解決方法(轉)Linux
- Oracle DRM引起的問題解決一例Oracle
- ASM無法自動載入磁碟組問題解決一例ASM
- Java程式碼解決ElasticSearch的Result window is too large問題JavaElasticsearch
- Docker啟動故障問題 no such file or directory解決方法Docker
- Oracle 10.2.0.5 EM 啟動BUG問題解決Oracle
- 解決syslog伺服器啟動問題伺服器
- MySQL主從複製問題解決一例MySql
- GoldenGate Extract程式hang問題解決一例Go
- 表格不能垂直居中問題解決一例 (轉)
- PHP Warning: exec() has been disabled for security 問題解決辦法PHP
- 解決Vagrant報錯Warning: Authentication failure. Retrying問題AI
- 解決 Specified key was too long ... 767 bytes 的本質問題
- 解決 Ubuntu 在啟動時凍結的問題Ubuntu
- 解決MMM啟動監控報錯的問題
- 解決ORACLE無法啟動安裝的問題Oracle
- 關於listener無法啟動的問題解決
- window下的git [GIT] warning: LF will be replaced by CRLF問題解決方法Git
- Excel檔案彈出隱私問題警告的解決方法Excel
- oracle dbca報Exception in thread main 問題解決一例OracleExceptionthreadAI
- 解決Restarting死程式QMN0問題一例REST
- 解決HIS叢集系統的效能問題一例
- 遠端服務不能啟動問題的解決方法
- Spring Boot幾種啟動問題的解決方案Spring Boot
- 解決hyper v導致docker無法啟動問題Docker