专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »web服务器 » apache连接数:增加Apache最大连接数的思路方法详细介绍 »正文

apache连接数:增加Apache最大连接数的思路方法详细介绍

来源: 发布时间:星期四, 2009年1月15日 浏览:33次 评论:0
  在httpd.conf中设置:

  MaxClients n

  1、apache1.x

  n是整数表示最大连接数取值范围在1和256的间如果要让apache支持更多连接数那么需要修改源码中httpd.h文件编辑/httpd-2.0.59//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文件

  找到

<IfModule prefork.c>
StartServers    8
MinSpareServers  5
MaxSpareServers  20
MaxClients    150
MaxRequestsPerChild 1000
</IfModule>
修改MaxClients    150ServerLimit    1500
MaxClients     1500
  然后保存退出

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

标签:apache连接数
0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: