All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
增加Apache最大连接数的方法详细介绍_php资料_编程技术

Writer: aaa Article type: Programming skills(编程技巧) Time: 2013/12/27 20:03:38 Browse times: 362 Comment times: 0

增加Apache最大连接数的方法详细介绍_php资料_编程技术


Head photo

Go homepage
Upload pictures
Write articles

增加Apache最大连接数的方法详细介绍_php资料_编程技术-你的首页-uuhomepage.com

在httpd.conf中设置:

MaxClients n

1、apache1.x

n是整数,表示最大连接数,取值范围在1和256之间,如果要让apache支持更多的连接数,那么需要修改源码中的httpd.h文件,编辑/httpd-2.0.59/include/httpd.h中的HARD_SERVER_LIMIT值改大然后再编译。

增加apache最大连接数的方法:

在httpd.conf中设置:

MaxClients n

n是整数,表示最大连接数,取值范围在1和256之间,如果要让apache支持更多的连接数,那么需要修改源码中的httpd.h文件,把定义的HARD_SERVER_LIMIT值改大然后再编译

2、apache2.x

系统默认150个连接数,下面的例子修改为1500个。

修改httpd.conf文件

找到

StartServers       8MinSpareServers    5MaxSpareServers   20MaxClients       150MaxRequestsPerChild  1000修改MaxClients       150为ServerLimit        1500MaxClients         1500

然后保存退出。

重新启动http服务(/etc/rc.d/init.d/httpd restart)






There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.