21

解析Linux中出现的错误:toomanyopenfiles

 5 years ago
source link: https://www.linuxprobe.com/linux-toomanyopenfiles.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

这个问题的出现原因是system对程序打开files数量的限制问题。

用 ulimit -a 命令可以查看

  普通的设置,退出shell再次登录,一般是不生效,那就来点绝的:

//etc/profile下,加入一行ulimit -SHn 51200 (注意里面已经有一条关于ulimit的设置)

rc.local下,加入一行 ulimit -SHn 51200 (不知这条有没有必要,其实我还没加)

详见 :

ulimit -S -c 0 > /dev/null 2>&1

这条语句设置了对软件资源和对core文件大小的设置


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK