Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MongDB starts the warning "WARNING: soft rlimits too low." "the solution to the problem

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

MongDB starts the warning "WARNING: soft rlimits too low." The solution to the problem, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

When MongoDB 3.4starts, there are the following alarms:

# 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.

View system restrictions:

# 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

Solution:

You can set it directly in the current shell: ulimit-n

For example:

Ulimit-f unlimited

Ulimit-t unlimited

Ulimit-v unlimited

Ulimit-n 64000

Ulimit-m unlimited

Ulimit-u 64000

Permanent and needs to be written to / etc/profile

After modification, you need to restart the mongod service.

> use admin

> db.shutdownServer ()

About MongDB startup warning "WARNING: soft rlimits too low." The solution to the problem is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report