Skip to content

Instantly share code, notes, and snippets.

@ralfr
Last active April 29, 2018 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralfr/66c2a4cfe16842f3eacb3db0ff3f5634 to your computer and use it in GitHub Desktop.
Save ralfr/66c2a4cfe16842f3eacb3db0ff3f5634 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 change open file limits
# Ubuntu 16.04
# Show max. open files for system
cat /proc/sys/fs/file-max
nano /etc/sysctl.conf
# Add the following line:
fs.file-max = 200000
# Persist changes
sysctl -p
nano /etc/security/limits.conf
# Add the following lines:
* soft nofile 200000
* hard nofile 200000
* soft nproc 200000
* hard nproc 200000
root hard nofile 200000
root soft nofile 200000
nano /etc/pam.d/common-session
# Add the following line:
session required pam_limits.so
ulimit -n 200000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment