錯誤記錄檔位置:<br />/xampp/apache/logs/error.log<br />Apache錯誤:[error] (OS 10038)在一個非通訊端上嘗試了一個操作<br />今日電腦上的APACHE啟動後CPU佔用率一直高居100%, PHP程式也無法執行了。<br />查看錯誤記錄檔裡面記錄了很多:<br />[error] (OS 10038)在一個非通訊端上嘗試了一個操作。 : Child 3356: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive.<br />去到網上搜尋,找到下面的解決方案:<br />編輯httpd.conf<br />Win32DisableAcceptEx ##加入這行<br />ThreadsPerChild 250<br />MaxRequestsPerChild 0<br />重啟apache就解決了。<br />修改後還是不行,任然有錯誤記錄,CPU佔用率是降低了,但是還是沒有恢複到原來的狀態.logs裡面還是一直在記錄下面的錯誤報表。<br />[Mon Dec 24 16:48:06 2007] [error] (OS 10038)在一個非通訊端上嘗試了一個操作。 : Too many errors in select loop. Child process exiting.<br />[Mon Dec 24 16:48:06 2007] [notice] Child 1916: Exit event signaled. Child process is ending.<br />[Mon Dec 24 16:48:07 2007] [notice] Child 1916: Released the start mutex<br />[Mon Dec 24 16:48:07 2007] [notice] Child 1916: Waiting for 250 worker threads to exit.<br />[Mon Dec 24 16:48:07 2007] [notice] Child 1916: All worker threads have exited.<br />[Mon Dec 24 16:48:07 2007] [notice] Child 1916: Child process is exiting<br />[Mon Dec 24 16:48:07 2007] [notice] Parent: child process exited with status 0 -- Restarting.<br />[Mon Dec 24 16:48:07 2007] [notice] Apache/2.0.55 (Win32) configured -- resuming normal operations<br />[Mon Dec 24 16:48:07 2007] [notice] Server built: Oct 9 2005 19:16:56<br />[Mon Dec 24 16:48:07 2007] [notice] Parent: Created child process 3028<br />[Mon Dec 24 16:48:07 2007] [notice] Disabled use of AcceptEx() WinSock2 API<br />[Mon Dec 24 16:48:07 2007] [notice] Child 3028: Child process is running<br />[Mon Dec 24 16:48:07 2007] [notice] Child 3028: Acquired the start mutex.<br />[Mon Dec 24 16:48:07 2007] [notice] Child 3028: Starting 250 worker threads.<br />[Mon Dec 24 16:48:08 2007] [notice] Child 3028: Listening on port 80.<br />最後搜尋到與winsock有關,有網友也出現了這個問題,他認為是金山毒霸或者升級精靈修改了WINSOCK導致的。<br />我沒有安裝但是系統經常自動更新,別的軟體也有,可能會有衝突,改下沒有錯 呵呵。<br />於是搜尋到恢複Winsock的方法:<br />cmd下<br />netsh winsock reset<br />使用此條命令恢複後,重啟電腦,這下Apache恢複當原先的良好狀態了。