系统允许一个进程打开的文件数
修改文件/etc/security/limits.conf,在文件尾部添加如下代码(如果已经存在则修改相应数值):
root soft nofile 65535
root hard nofile 65535
* soft nofile 65535
* hard nofile 65535
注:只配置最后两行不就可以了吗,为啥还要单独为root用户配置呢?查了网上资料,说是*这样的通配符对root用户无效,所以root需要单独配置(嗯,阿里云ECS就配置了上面这4行)。