我一般都是在Linux的机器上使用Apache,也没发现这个问题。今天在Windows上装了一个Apache 2,结果运行起来就发现 CPU 的资源很快就上升到100%,打开浏览器访问 http://localhost/ 也没有响应。查看了一下 Apache 的运行日志,发现错误日志不停的增加,内容大致就是:

[Fri Feb 09 09:34:10 2007] [error] (OS 10038)An operation was attempted on something that is not a socket. : Child 1764: Encountered too many errors accepting client connections. Possible causes: dynamic address renewal, or incompatible VPN or firewall software. Try using the Win32DisableAcceptEx directive.

就是这个错误,不停的出现。
看日志上提示说尝试使用 Win32DisableAcceptEx 指令,当然要照着办了,打开 conf/httpd.conf,在最后一行添加了这条指令,就光秃秃的写了一个

Win32DisableAcceptEx

什么参数也不需要,就这样重新运行 Apache ,出现了这样一个提示:[Fri Feb 09 09:34:31 2007] [notice] Disabled use of AcceptEx() WinSock2 API。啊哈,正常了。
上 Google 找了一下,发现这个问题的原因原来是 Apache 的新版本中对 Winsock2 的支持有问题,原因不明,只是在部分的Windows上会有这样的问题,已经很长时间了 ^_^。

1 Comment

  1. Vatsala Dua says:

    I tried finding you through the link you put onto your site but could not move through. Just checking what is the theme youre using, it is every bit awesome!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.