Last active
March 10, 2021 05:06
-
-
Save vmenajr/8209a97f79c1e8817b5722c29db07478 to your computer and use it in GitHub Desktop.
MongoDB Ubuntu 16.04 sticky ulimits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# system maximum | |
cat /proc/sys/fs/file-max | |
# available limit | |
ulimit -n | |
# Increase system-wide limit in /etc/sysctl.conf | |
fs.file-max = 200000 | |
# Refresh | |
sudo sysctl -p | |
# Modify limits in /etc/security/limits.conf | |
mongodb soft nproc 200000 | |
mongodb hard nproc 200000 | |
mongodb soft nofile 200000 | |
mongodb hard nofile 200000 | |
mongodb soft memlock 2048 | |
mongodb hard memlock 2048 | |
# Enable limits.conf processing in /etc/pam.d/common-session | |
session required pam_limits.so | |
#Log out/in to get the changes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment