Skip to content

Instantly share code, notes, and snippets.

@1901
Last active July 18, 2019 13:33
Show Gist options
  • Save 1901/46f42c499e52f1c146d9a515aa7bc758 to your computer and use it in GitHub Desktop.
Save 1901/46f42c499e52f1c146d9a515aa7bc758 to your computer and use it in GitHub Desktop.
[Linux max open files] #linux
ulimit -a
ulimit -n
# check hard limit
ulimit -Hn
# check soft limit
ulimit -Sn
# current session change
sysctl -w fs.file-max=500000
# check the value
cat /proc/sys/fs/file-max
# permanently change
vim /etc/sysctl.conf
> fs.file-max=500000
# check the value
cat /proc/sys/fs/file-max
# apply the changes
sysctl -p
vim /etc/security/limits.conf
<domain> <type> <item> <value>
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
# relogin or reboot check the value again.
# ref: https://www.tecmint.com/increase-set-open-file-limits-in-linux/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment