ubuntu系统修改/etc/security/limits.conf,添加:
root soft nofile 8192
root hard nofile 8192
注意:不要使用通配符*,即:* hard nofile 8192等。这样会导致配置失效,最好还是按照标准模式来配置,配置完需要重启。
另外需要检查相应程序进程是否真正配置成功:cat /proc/pid(进程id)/limits,查看:
如果显示的和配置一样代表配成功。
查看进程打开的文件数量:lsof -p pid |wc -l