参考文章:
https://blog.csdn.net/fanren224/article/details/79971359
https://www.cnblogs.com/micmouse521/p/8116329.html
那么如何配置nofile,确定nofile的最大值呢。
个人经验是使用ulimt -n命令进行测试,如果小于系统允许的最大值,设置成功,大于最大值,系统会报错提示。
1
2
3
4
5
6
7
|
# ulimit -n 1100000
-
bash
:
ulimit
:
open
files: cannot modify limit: Operation not permitted
# ulimit -n 1048576
# ulimit -n 1048577
-
bash
:
ulimit
:
open
files: cannot modify limit: Operation not permitted
# ulimit -n 1048575
# ulimit -n 1048576
|