临时设置

命令 说明
ulimit -a 查看所有限制值
ulimit -n 65535 临时调整open files限制值

永久设置

配置文件:
/etc/security/limits.conf

1
2
3
4
5
6
7
8
*               soft    nofile          65535
* hard nofile 65535
* hard nproc 65535
* soft nproc 65535
root soft nofile 65535
root hard nofile 65535
root hard nproc 65535
root soft nproc 65535
1
2
3
4
*               soft    nofile          65535
* hard nofile 65535
* hard nproc 65535
* soft nproc 65535