分类:
2007-05-17 12:29:47
换了apache 2.0后,发现访问网站特别慢而且时断时续,在日志中有以下记录
[Sat Dec 24 17:21:28 2005] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.
解决办法:
在httpd.conf文件中添加 Win32DisableAcceptEx 标记,如下:
ThreadsPerChild 1000
MaxRequestsPerChild 10000
Win32DisableAcceptEx
这样可以允许并发连接更大一些。同时性能上也不会有明显的降低.
以下是摘自官方网站的信息:
This Multi-Processing Module is optimized for Windows NT. | |
MPM | |
mpm_winnt_module | |
mpm_winnt.c |
This Multi-Processing Module (MPM) is the default for the Windows NT operating systems. It uses a single control process which launches a single child process which in turn creates threads to handle requests
Use accept() rather than AcceptEx() to accept network connections | |
Win32DisableAcceptEx | |
AcceptEx() is enabled by default. Use this directive to disable use of AcceptEx() | |
server config | |
MPM | |
mpm_winnt | |
Available in Version 2.0.49 and later |
AcceptEx()
is a Microsoft WinSock v2 API that provides some performance improvements over the use of the BSD style accept()
API in certain circumstances. Some popular Windows products, typically
virus scanning or virtual private network packages, have bugs that
interfere with the proper operation of AcceptEx()
. If you encounter an error condition like:
[error]
(730038)An operation was attempted on something that is not a socket.:
winnt_accept: AcceptEx failed. Attempting to recover.
you should use this directive to disable the use of AcceptEx()
.