Last active
July 18, 2019 13:33
-
-
Save 1901/46f42c499e52f1c146d9a515aa7bc758 to your computer and use it in GitHub Desktop.
[Linux max open files] #linux
This file contains hidden or 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
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