-------------------1
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 200
<IfModule prefork.c>
ServerLimit 150
StartServers 4
MinSpareServers 4
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 40
</IfModule>
--------------------2
Timeout 20
KeepAlive On
MaxKeepAliveRequests 80
KeepAliveTimeout 180
<IfModule prefork.c>
ServerLimit 20000
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 1000
MaxRequestsPerChild 0
ServerLimit 2000
</IfModule>
---------------------3
Timeout 20
KeepAlive On
MaxKeepAliveRequests 80
KeepAliveTimeout 180
<IfModule worker.c>
ServerLimit 16
ThreadLimit 64
StartServers 3
MaxClients 400 #ServerLimit*ThreadsPerChild
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestsPerChild 3000
</IfModule>
<IfModule worker.c>
StartServers 3
MaxClients 2000
ServerLimit 25
MinSpareThreads 50
MaxSpareThreads 200
ThreadLimit 200
ThreadsPerChild 100
MaxRequestsPerChild 0
<IfModule worker.c>
ServerLimit 64
ThreadLimit 200
StartServers 5
MaxClients 2500
MinSpareThreads 50
maxSpareThreads 200
ThreadsPerChild 100
MaxRequestsPerChild 1000
</IfModule>
</IfModule>----------------------4
Timeout 10
KeepAlive On
MaxKeepAliveRequests 5
KeepAliveTimeout 5
<IfModule mpm_prefork_module>
ServerLimit 3000
StartServers 750
MinSpareServers 5
MaxSpareServers 100
MaxClients 3000
MaxRequestsPerChild 10000
</IfModule>
1.
开始->运行->cmd
输入:netsh winsock reset
回车
2.
【解决办法:】在httpd.conf文件中添加 Win32DisableAcceptEx 标记,如下:
\< IfModule mpm_winnt.c\>
ThreadsPerChild 1000
MaxRequestsPerChild 10000
Win32DisableAcceptEx
\</IfModule\>
这样可以允许并发连接更大一些。同时性能上也不会有明显的降低. 一般,这样设置基本就能搞定,但是我碰到的情况,就是想上面那样关闭AcceptEx,也会出现类似问题,Apache还是不能正常运作,error.log 出项了大量的:Sat Dec 24 17:21:28 2006] [warn] (OS 64)指定的网络名不再可用。 : winnt_accept: Asynchronous AcceptEx failed.。又找了一下,发现了如下的一种解决办法,我试了试,果然可以,而且在多台服务器上试过,只要出现了AcceptEx 的问题,就能解决,具体设置为: 1、网上邻居-;本地连接-;属性-;internet协议(TCP/IP)-;属性-;高级-;wins标签-;去掉启用LMhosts查询前的勾. 2、控制面版-;windows防火墙-;高级标签-;本地连接设置-;服务的标签里勾选安全Web服务器(HTTPS)。 3、然后退出Apache,再打开启动就可以了 ,一开始我没有退出,直接在那重启,就是不可以,一定要先停止,在开启即可。
摘自:http://www.kkkdm.com