首页 > 代码库 > fork failed.: Cannot allocate memory
fork failed.: Cannot allocate memory
在做压力测试时候:
[root@666 ok]# webbench -c 5000 -t30 http://10.100.0.61/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://10.100.0.61/ 5000 clients, running 30 sec. Speed=176440 pages/min, 4025737 bytes/sec. Requests: 88219 susceed, 1 failed. [root@666 ok]# webbench -c 50000 -t30 http://10.100.0.61/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://10.100.0.61/ 50000 clients, running 30 sec. problems forking worker no. 6594 fork failed.: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory bash: fork: Cannot allocate memory .... bash: cannot make pipe for command substitution: Too many open files
查询pid_max值:
[root@666 ok]# sysctl kernel.pid_max kernel.pid_max = 32768
修改pid_max的值:
[root@666 ok]# sysctl -w kernel.pid_max=60000 kernel.pid_max = 60000 [root@666 ok]# sysctl kernel.pid_max kernel.pid_max = 60000
[root@666 ok]# echo ‘kernel.pid_max=9999‘ >>/etc/sysctl.conf [root@666 ok]# sysctl -p kernel.pid_max = 9999
fork failed.: Cannot allocate memory
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。