最近我的apache服务每天早上都会停止服务,以前一直都是正常的。我看了一下日志,因为是新手不知道如何解决,请各位大神帮忙看一下。
[Tue Mar 28 08:55:25.150716 2017] [mpm_winnt:error] [pid 4256:tid 6668] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
[Tue Mar 28 08:55:25.181917 2017] [:error] [pid 4256:tid 1376] [client 66.249.79.112:57001] script 'C:/WWW/brand_cate.php' not found or unable to stat
[Tue Mar 28 08:55:25.197517 2017] [mpm_winnt:notice] [pid 2932:tid 416] AH00428: Parent: child process 4256 exited with status 3221225477 -- Restarting.
[Tue Mar 28 08:55:31.219127 2017] [mpm_winnt:notice] [pid 2932:tid 416] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/5.2.17 configured -- resuming normal operations
[Tue Mar 28 08:55:31.219127 2017] [mpm_winnt:notice] [pid 2932:tid 416] AH00456: Server built: Dec  9 2015 12:21:09
[Tue Mar 28 08:55:31.219127 2017] [core:notice] [pid 2932:tid 416] AH00094: Command line: 'D:\\phpStudy\\Apache\\bin\\httpd.exe -d D:/phpStudy/Apache'
[Tue Mar 28 08:55:31.234727 2017] [mpm_winnt:notice] [pid 2932:tid 416] AH00418: Parent: Created child process 5912
[Tue Mar 28 08:55:38.161139 2017] [mpm_winnt:notice] [pid 5912:tid 432] AH00354: Child: Starting 150 worker threads.

解决方案 »

  1.   

    帮你百度了下
    http://wmcxy.blog.51cto.com/2509483/773437主要apapche线程数问题 设置下
      

  2.   

    在httpd.conf中并没有设置线程数量,Apache默认开启了64个,看来是远远不够。于是上网一查,在httpd.conf加入以下内容:
    <IfModule mpm_winnt_module>
    ThreadsPerChild 512 
    MaxRequestsPerChild 0
    </IfModule>
    这样开启了512工作线程。这个值根据需要可能要慢慢调整
    按照上面的修改进行httpd。conf文件的修改,然后重启服务器,可以正常访问,问题解决