起进程提示open file too much
问题来源
ubuntu下需要起很多进程,跑了一会提示open file too much.
解决过程
默认是1024,调大就好了。但是试了几个都无效。
最终在这里找到了解决方案。
Modify /etc/systemd/user.conf and /etc/systemd/system.conf with the following line (this takes care of graphical login):
DefaultLimitNOFILE=65535
Modify /etc/security/limits.conf with the following lines (this takes care of non-GUI login):
username hard nofile 65535
username soft nofile 65535
重启后生效