今日電腦上的APACHE啟動后CPU占用率一直高居100%, PHP程序也無法執(zhí)行了。 查看錯(cuò)誤日志里面記錄了很多: [error] (OS 10038)在一個(gè)非套接字上嘗試了一個(gè)操作。 : 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. 去到網(wǎng)上搜索,找到下面的解決方法: 編輯httpd.conf Win32DisableAcceptEx ##加入這行 ThreadsPerChild 250 MaxRequestsPerChild 0 重啟apache就解決了。 修改后還是不行,任然有錯(cuò)誤記錄,CPU占用率是降低了,但是還是沒有恢復(fù)到原來的狀態(tài).logs里面還是一直在記錄下面的錯(cuò)誤報(bào)告。 [Mon Dec 24 16:48:06 2007] [error] (OS 10038)在一個(gè)非套接字上嘗試了一個(gè)操作。 : Too many errors in select loop. Child process exiting. [Mon Dec 24 16:48:06 2007] [notice] Child 1916: Exit event signaled. Child process is ending. [Mon Dec 24 16:48:07 2007] [notice] Child 1916: Released the start mutex [Mon Dec 24 16:48:07 2007] [notice] Child 1916: Waiting for 250 worker threads to exit. [Mon Dec 24 16:48:07 2007] [notice] Child 1916: All worker threads have exited. [Mon Dec 24 16:48:07 2007] [notice] Child 1916: Child process is exiting [Mon Dec 24 16:48:07 2007] [notice] Parent: child process exited with status 0 — Restarting. [Mon Dec 24 16:48:07 2007] [notice] Apache/2.0.55 (Win32) configured — resuming normal operations [Mon Dec 24 16:48:07 2007] [notice] Server built: Oct 9 2005 19:16:56 [Mon Dec 24 16:48:07 2007] [notice] Parent: Created child process 3028 [Mon Dec 24 16:48:07 2007] [notice] Disabled use of AcceptEx() WinSock2 API [Mon Dec 24 16:48:07 2007] [notice] Child 3028: Child process is running [Mon Dec 24 16:48:07 2007] [notice] Child 3028: Acquired the start mutex. [Mon Dec 24 16:48:07 2007] [notice] Child 3028: Starting 250 worker threads. [Mon Dec 24 16:48:08 2007] [notice] Child 3028: Listening on port 80. 最后搜索到與winsock有關(guān),有網(wǎng)友也出現(xiàn)了這個(gè)問題,他認(rèn)為是金山毒霸或者升級精靈修改了WINSOCK導(dǎo)致的。由于我電腦上也安裝了金山毒霸,而且最近幾天也升級過了,應(yīng)該是同樣的問題。于是搜索到恢復(fù)Winsock的方法: netsh winsock reset 使用此條命令恢復(fù)后,重啟電腦,這下Apache恢復(fù)當(dāng)原先的良好狀態(tài)了。 希望遇見這樣問題的朋友們能得到幫助~~!
發(fā)表評論