How to set the number of concurrent Apache
Website slow response is not necessarily a problem with the program or database, Apache concurrent number setting problem will also lead to when the site traffic is too large when the request is particularly slow or failure problem, then how to set the concurrency of Apache?
1. Modify in the httpd.conf file
#Server-pool Management (MPM specific)
#Include conf/extra/httpd-mpm.conf
Remove the # comment from the above sentence
2, determine the current Apache is what MPM mode (winnt mode, perfork mode, worker mode)
Go to the Apache/bin directory
CMD command: httpd.exe-1
Description: See mpm_xxx.c if XXX is winnt description is Winnt, also may be perfork or worker
3. Modify the Httpd-mpm.conf file
# WinNT MPM
# threadsperchild:constant number of worker threads in the server process
# maxrequestsperchild:maximum number of requests a server process serves
Threadsperchild 150//modify this value to
Maxrequestsperchild 0
4. Restart Apache, test to see
Under Linux, the generally used MPM is the perfork mode
Startservers 5//Pre-start 5 processes
Minspareservers 5//Minimum Idle Process
Maxspareservers 10//MAX Idle Process
MaxClients 150//Number of concurrent connections
Maxrequestsperchild 0//refers to how many threads can be played in a process, better for the worker, 0 for unrestricted
Give everyone a reasonable suggestion to configure, on the partial site, medium website, configuration:
Startservers 5//Pre-start 5 processes
Minspareservers 5//Minimum Idle Process
Maxspareservers 10//MAX Idle Process
Serverlimit 1500//For modifying Apache programming parameters
MaxClients 1000//number of concurrent connections
Maxrequestsperchild 0//refers to how many threads can be played in a process, better for the worker, 0 for unrestricted
If your site has a PV value of millions, you can set this up:
Serverlimit 2500//For modifying Apache programming parameters
MaxClients 2000//Number of concurrent connections
Articles you may be interested in
- How to set phpMyAdmin automatic login and cancel auto sign-in
- PHP parsing URL (parse_url) parameter array (PARSE_STR)
- How to set the div layer to display on top of Flash objects, compatible with browsers such as IE and Firefox
- PHP calculates a function that is currently the first week of the year or January
- jquery Settings button is not clickable to prevent duplicate submission of data
- MySQL queue for efficient concurrent read data
- How to set default parameter values for a function in JavaScript
- JavaScript implements ReplaceAll (global match and replace) method
http://www.bkjia.com/PHPjc/991317.html www.bkjia.com true http://www.bkjia.com/PHPjc/991317.html techarticle How to set the concurrent number of Apache Web site slow response is not necessarily a problem with the program or database, Apache concurrent number setting problem will also cause when the site traffic is too large to appear ...