Hi there,
I have installed Mongo DB 3.2 on AWS replica set, with 3 Ubuntu 16.04 LTS instances as the nodes.
I have problems setting the <Max Open Files> and <Max Processes> for the mongod process.
mongod is running under mongodb user.
other processes that run under mongodb user has 64,000 set properly , as i changed the ulimit of those , system wide, but that change didn't stick specifically with the mongod process.
I have a mongod.service script under /lib/systemd/system and it shows the following:
---------->
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
LimitFSIZE=infinity # file size
LimitCPU=infinity # cpu time
LimitAS=infinity # virtual memory size
LimitNOFILE=64000 # open files
LimitNPROC=64000 # processes/threads
TasksMax=infinity # total threads (user+kernel)
TasksAccounting=false
# Recommended limits for for mongod as specified in
[Install]
WantedBy=multi-user.target
<--------------
I do not have a script under /etc/init.d
i use service mongod [commands] to control mongod
the status for mongod shows the following:
---------->
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2016-11-22 22:19:12 UTC; 7h ago
Main PID: 13970 (mongod)
Tasks: 72
Memory: 82.0M
CPU: 1min 47.637s
CGroup: /system.slice/mongod.service
└─13970 /usr/bin/mongod --quiet --config /etc/mongod.conf
<--------------
and the ulimits for the process shows this:
cat /proc/13970/limits
---------->
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 31868 31868 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 31868 31868 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
<--------------
I am lost, i don't understand why mongod doesn't get the limits changes that i set for, especially when other processes like mms-automation that run under the same mongodb user get's them
Any advise ?