Apache在访问量大的时候,出现假死,服务处于启动状态,但是网站无法打开。apache log/error.log文件出现如下提示:
[warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
[Mon Dec 26 21:24:13 2011] [notice] Child 2180: Child process is running
[Mon Dec 26 21:24:13 2011] [notice] Child 2180: Acquired the start mutex.
[Mon Dec 26 21:24:13 2011] [notice] Child 2180: Starting 64 worker threads.
[Mon Dec 26 21:24:13 2011] [notice] Child 2180: Starting thread to listen on port 80.
[warn] Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
按提示应是apache线程数超过64造成,修改apache默认线程数步骤如下:
1、在conf/httpd.conf文件中修改/添加
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxRequestsPerChild 0
</IfModule>
2、在conf/extra/httpd-mpm.conf文件中修改/添加
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxRequestsPerChild 0
</IfModule>
转载请注明 :IT樵客

