Check openfiles
root#ulimit -a real-time non-blocking time (microseconds, -R) unlimited core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 127697 max locked memory (kbytes, -l) 4096024 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 127697 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
root#ulimit -Sn #check soft limit
1024
root#ulimit -Hn #check for hard limit
1048576
Increase Limit for Current session
ulimit -n 200000
Increase per-user limit
Change /etc/security/limits.conf
sudo vim /etc/security/limits.conf root soft nproc 65535 root hard nproc 65535 root soft nofile 65535 root hard nofile 65535 * soft nproc 200000 * hard nproc 200000 * soft nofile 200000 * hard nofile 200000
Change pam.d
sudo vim /etc/pam.d/common-session session required pam_limits.so
Increase system-wide limit
vim /etc/sysctl.conf fs.file-max = 2097152 root#sysctl -p
reboot
标签:files,open,hard,unlimited,kbytes,Increase,root,size From: https://www.cnblogs.com/tben/p/17401795.html