遇到這種情況一般是你開(kāi)的并行數(shù)量太多了。。。例如:ab -c 1000 -n 10000 http://localhost/index.html 如此大的請(qǐng)求就會(huì)掛掉,不過(guò)還是有補(bǔ)救措施的,可以通過(guò)增加并發(fā)數(shù)上限解決這個(gè)問(wèn)題,步驟如下:
1、停止Apache服務(wù);
2、找到apache/conf/httpd.conf文件,用文本編輯器打開(kāi)找到這兩行:# Server-pool management (MPM specific)# Include conf/extra/httpd-mpm.conf把第二行include........這行的注釋去掉。
3、找到apache/conf/extra/httpd-mpm.conf文件,打開(kāi),找到:
<IfModule mpm_winnt_module>ThreadsPerChild 150MaxRequestsPerChild 0</IfModule>把上面的150調(diào)大,Windows下最大為1920.
注意:尖括號(hào)里的名字是winnt,不要看錯(cuò)了
4、重新啟動(dòng)Apache服務(wù).
轉(zhuǎn)載自http://blog.csdn.net/exlsunshine/article/details/24517433