A detailed introduction to the method of increasing the maximum number of Apache connections

Source: Internet
Author: User
Tags integer modify

Set in httpd.conf:

MaxClients N

1, apache1.x

n is an integer that represents the maximum number of connections between 1 and 256, if you want to allow Apache to support more connections, then you need to modify the Httpd.h file in the source code, edit the/httpd-2.0.59/include/httpd.h in the Hard_server_ The limit value is changed to large and then compiled.

Ways to increase the maximum number of Apache connections:

Set in httpd.conf:

MaxClients N

n is an integer that represents the maximum number of connections between 1 and 256, if you want to allow Apache to support more connections, then you need to modify the Httpd.h file in the source code, the definition of the Hard_server_limit value and then compile

2, apache2.x

The system defaults to the number of 150 connections, and the following example is modified to 1500.

modifying httpd.conf files

Found it

 
 
  
  <ifmodule prefork.c>startservers       8MinSpareServers    5MaxSpareServers   20MaxClients       150MaxRequestsPerChild  1000</ifmodule> modified maxclients       150 to Serverlimit        1500MaxClients         1500
 
 

Then save the exit.

Restart the HTTP service (/etc/rc.d/init.d/httpd restart)



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.