Linux 报错:too many open files

警告
本文最后更新于 2024-11-04,文中内容可能已过时。

查看文件数

1
2
3
ulimit -a

ulimit -n

增加文件数

1
2
3
4
5
6
7
vim /etc/security/limits.conf

* soft nofile 40960
* hard nofile 40960

echo "fs.file-max = 6553500" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

注销后重新登录即可生效。

william 支付宝支付宝
william 微信微信
0%