Mongodb start Error: "/sys/kernel/mm/transparent_hugepage/enabled is ' always '"

Source: Internet
Author: User
Tags mongodb centos
System Environment
Distributor Id:centos
Description:    CentOS Release 6.7 (Final)
release:    6.7
codename:   Final
Problem Description

Error after installing MongoDB on the system.
(Installation Tutorial Address: https://docs.mongodb.com/master/tutorial/install-mongodb-on-red-hat/)

Error message:
WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ' always '. We suggest setting it to ' never '
WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ' always '. We suggest setting it to ' never '
WARNING: soft rlimits too low. Rlimits set to 1024x768 processes, 65535 files. Number of processes should is at least 32767.5:0.5 times number of files.
As shown in figure:
Solution Solutions first two warning

sudo echo "never" >/sys/kernel/mm/transparent_hugepage/enabled
sudo echo "never" >  /sys/kernel/mm/ Transparent_hugepage/defrag
a third warning
Vim/etc/security/limits.conf
Add a few lines
mongod  soft  nofile  64000
mongod  Hard Nofile  64000
mongod  soft  nproc  32000
mongod  hard  nproc  32000
Restart Mongod
sudo service mongod restart
Success

After the restart success, all the errors are gone, as follows

➜  ~ git: (master) MONGO
MongoDB shell version:3.2.6
connecting to:test
>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.