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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.