首页 > 服务器 > Apache > Apache错误:[error] (OS 10038)在一个非套接字上尝试了一个操作
2014
11-12

Apache错误:[error] (OS 10038)在一个非套接字上尝试了一个操作

今日电脑上的APACHE启动后CPU占用率一直高居100%,而且磁盘空间占满,PHP程序也无法执行了。
查看错误日志里面记录了很多:
[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.

去到网上搜索,找到下面的解决方法:

编辑httpd.conf

Win32DisableAcceptEx ##加入这行
ThreadsPerChild 250
MaxRequestsPerChild 0

重启apache就解决了。

修改后还是不行,任然有错误记录,CPU占用率是降低了,但是还是没有恢复到原来的状态.logs里面还是一直在记录下面的错误报告。

[Mon Dec 24 16:48:06 2014] [error] (OS 10038)在一个非套接字上尝试了一个操作。 : 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 Nov 10 09:43:12 2014] [notice] Child 1916: Released the start mutex
[Mon Nov 10 09:43:12 2014] [notice] Child 1916: Waiting for 250 worker threads to exit.
[Mon Nov 10 09:43:12 2014] [notice] Child 1916: All worker threads have exited.
[Mon Nov 10 09:43:12 2014] [notice] Child 1916: Child process is exiting
[Mon Nov 10 09:43:12 2014] [notice] Parent: child process exited with status 0 — Restarting.
[Mon Nov 10 09:43:12 2014] [notice] Apache/2.0.55 (Win32) configured — resuming normal operations
[Mon Nov 10 09:43:12 2014] [notice] Server built: Oct 9 2005 19:16:56
[Mon Nov 10 09:43:12 2014] [notice] Parent: Created child process 3028
[Mon Nov 10 09:43:12 2014] [notice] Disabled use of AcceptEx() WinSock2 API
[Mon Nov 10 09:43:12 2014] [notice] Child 3028: Child process is running
[Mon Nov 10 09:43:12 2014] [notice] Child 3028: Acquired the start mutex.
[Mon Nov 10 09:43:12 2014] [notice] Child 3028: Starting 250 worker threads.
[Mon Dec 24 16:48:08 2007] [notice] Child 3028: Listening on port 80.

最后搜索到与winsock有关,有网友也出现了这个问题,他认为是金山毒霸或者升级精灵修改了WINSOCK导致的。由于我电脑上也安装了金山毒霸,而且最近几天也升级过了,应该是同样的问题。于是搜索到恢复Winsock的方法:

netsh winsock reset

使用此条命令恢复后,重启电脑,这下Apache恢复当原先的良好状态了。

希望遇见这样问题的朋友们能得到帮助~~!

最后编辑日期:
作者:uuling
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。