为了账号安全,请及时绑定邮箱和手机立即绑定

频繁提示 Apache HTTP Server 已停止工作

频繁提示 Apache HTTP Server 已停止工作

PHP
喵喵时光机 2019-03-17 10:51:19
服务器用的是阿里云,安装的是PhpStudy,每过几小时,就会出现网站无法访问的情况,服务器出现这个错误。但PhpStudy并没有报错退出,只要然后点击“关闭程序”结束这个窗口,网站就能恢复访问。 我尝试了以下方式,但是都没能解决问题: 将服务器内存从2GB升级到4GB; 在PhpStudy中将PHP版本切换至7.0.12; 将X:phpStudyPHPTutorialApacheconfextrahttpd-mpm.conf中的ThreadsPerChild值增加至1500 <IfModule mpm_winnt_module> ThreadsPerChild 1500 MaxRequestsPerChild 3000 </IfModule> 将X:phpStudyPHPTutorialMySQLmy.ini中的query_cache_size值修改为256M query_cache_size=256M 分别尝试将以下3个文件复制到C:WindowsSystem32: D:phpStudyPHPTutorialMySQLliblibmysql.dllD:phpStudyPHPTutorialphpphp-5.2.17libmysql.dllD:phpStudylibmysql.dll 以上方式都是Google出来的相关解决方案,但都没能解决这个问题,依旧是过几小时就会报错导致网站无法访问,求教大家是怎么回事? 错误日志(X:phpStudyPHPTutorialApachelogserror.log)相关信息:[Sun Apr 15 15:26:37.318002 2018] [mpm_winnt:notice] [pid 21256:tid 516] AH00363: Child: Terminating 149 threads that failed to exit.[Sun Apr 15 15:26:37.318980 2018] [mpm_winnt:notice] [pid 21256:tid 516] AH00364: Child: All worker threads have exited.[Sun Apr 15 17:20:57.704416 2018] [mpm_winnt:notice] [pid 20736:tid 508] AH00428: Parent: child process 21256 exited with status 3221225477 -- Restarting.[Sun Apr 15 17:20:57.966144 2018] [mpm_winnt:notice] [pid 20736:tid 508] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45 configured -- resuming normal operations[Sun Apr 15 17:20:57.966144 2018] [mpm_winnt:notice] [pid 20736:tid 508] AH00456: Server built: Jul 1 2016 16:42:20[Sun Apr 15 17:20:57.967120 2018] [core:notice] [pid 20736:tid 508] AH00094: Command line: 'X:\phpStudy\PHPTutorial\Apache\bin\httpd.exe -d D:/phpStudy/PHPTutorial/Apache'[Sun Apr 15 17:20:57.971046 2018] [mpm_winnt:notice] [pid 20736:tid 508] AH00418: Parent: Created child process 14368[Sun Apr 15 17:20:59.030613 2018] [mpm_winnt:notice] [pid 14368:tid 516] AH00354: Child: Starting 150 worker threads.[Sun Apr 15 17:20:59.047219 2018] [mpm_winnt:error] [pid 14368:tid 3188] AH00326: Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting 有大量的:[Fri Apr 20 17:33:06.965644 2018] [fcgid:error] [pid 14892:tid 588] FastCGI process 10700 still did not exit, terminating forcefully 最近一次出错时的最后两行错误信息:[Fri Apr 20 18:38:12.859160 2018] [mpm_winnt:notice] [pid 8908:tid 488] AH00363: Child: Terminating 647 threads that failed to exit.[Fri Apr 20 18:38:12.870901 2018] [mpm_winnt:notice] [pid 8908:tid 488] AH00364: Child: All worker threads have exited.
查看完整描述

7 回答

?
慕姐8265434

TA贡献1813条经验 获得超2个赞

  1. phpStudy我觉得比较适合的场景,是本地测试环境,放服务器上我觉得还是不太适合,看起来并没有比WAMP更靠谱
  2. 做运维,看起来越轻松的,坑就越大。比如phpStudy很傻瓜吧?面板还是中文的,这不闹脾气趴窝了不是?并且由于集成度高,你都不好确定是哪里出的问题……当然我承认这点有失偏颇,但是阿里云上,同样的低配,win系就得1G内存起,Linux512就给跑,这总说明问题吧?
  3. ……选Linux的话,其实也不难,首先市场里配好的镜像一堆,直接选镜像再按教程跑遍基础配置,快的很。倒是win系这边,也就占个图形化的优势,配起来并没容易很多,反而抵消掉图形的这点优势了。
  4. 好像这个回答并没有什么帮助……好吧那么建议题主试试WAMP,或者干脆就用IIS算了。我记得好像微软自己也有个matrix什么的套件吧?如果还能搜到也可以试试,毕竟是它们自家的。
查看完整回答
反对 回复 2019-03-18
?
PIPIONE

TA贡献1829条经验 获得超9个赞

尽量还是用 LAMP 或者 LNMP 配置的
phpStudy 在windows下做测试环境没问题,放在linux服务器上是不科学的

查看完整回答
反对 回复 2019-03-18
?
元芳怎么了

TA贡献1798条经验 获得超7个赞

CGI应用程序找不到,应该是有组建没装,导致频繁fork , 内存耗尽了。

查看完整回答
反对 回复 2019-03-18
?
白猪掌柜的

TA贡献1893条经验 获得超10个赞

服务器你装PHPStudy
PHPStudy是开发环境,正式环境可以用docker或者麻烦带编译安装

查看完整回答
反对 回复 2019-03-18
?
慕哥6287543

TA贡献1831条经验 获得超10个赞

这个。。。在线上我是没有用过这个phpstudy啦。但是我本地用的时候也有出现过类似的错误的。这是因为你的请求数量过大或者是CPU耗尽引起的。解决方法很简单,代码重新写,或者换一个高配的环境。。。小白见解,各位勿喷哈。。。【runing...】

查看完整回答
反对 回复 2019-03-18
?
潇潇雨雨

TA贡献1833条经验 获得超4个赞

直接换服务器的环境,换成Linux。然后把Apache换成nginx

查看完整回答
反对 回复 2019-03-18
  • 7 回答
  • 0 关注
  • 2634 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信