search
Homephp教程php手册增加Apache最大连接数的方法详细介绍

在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文件

找到

<ccid_code><ifmodule prefork.c>StartServers       8MinSpareServers    5MaxSpareServers   20MaxClients       150MaxRequestsPerChild  1000</ifmodule>修改MaxClients       150为ServerLimit        1500MaxClients         1500</ccid_code>

然后保存退出。

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



Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment