近来点击玩聚热点故事,偶尔遇到500错误,看了看Apache2.2.3日志(Windows2003下的),注意到如下错误丫的总出现:
[warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
以前也看到,但忽略了。这回不能再放过她了。
看了几篇(winnt(MPM) - Apache 2.2 中文版参考手册),说是因为一些流行的Windows产品,比如防病毒软件或虚拟专用网络软件,会干扰AcceptEx()
的正确操作。于是在apache配置文件中添加如下语句:
<IfModule mpm_winnt.c>
ThreadsPerChild 1000
MaxRequestsPerChild 10000
Win32DisableAcceptEx
</IfModule>
停止Apache,再启动。确实新配置起作用了:
[notice] Disabled use of AcceptEx() WinSock2 API
[notice] mod_python: Creating 8 session mutexes based on 0 max processes and 1000 max threads.
[notice] Child 2380: Child process is running
[notice] Child 2380: Acquired the start mutex.
[notice] Child 2380: Starting 1000 worker threads.
okay,似乎错误不再来了。
郑昀 20071227