亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

頻繁提示 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耗盡引起的。解決方法很簡單,代碼重新寫,或者換一個高配的環境。。。小白見解,各位勿噴哈。。?!緍uning...】

查看完整回答
反對 回復 2019-03-18
?
瀟瀟雨雨

TA貢獻1833條經驗 獲得超4個贊

直接換服務器的環境,換成Linux。然后把Apache換成nginx

查看完整回答
反對 回復 2019-03-18
  • 7 回答
  • 0 關注
  • 2670 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號