I would like to edit my httpd.conf to accept max of 1,000 clients connections. this is what I have now:
StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0
How should I edit it?
Assuming you have enough RAM to serve the requests, and you are using the prefork multi-processing module, you can use the 2 directives
MaxClients
andServerLimit
to set the total number of simultaneous requests that will be served;To check for prefork run
apachectl -V | grep MPM
and look for the following output;The MaxClients directive sets the limit on the number of simultaneous requests that will be served.
But the
ServerLimit
also puts a maximum limit on the number of processes that apache will spawn to serve requests.hence I would go for something like;
Alternatively for
For the worker MPM, this directive in combination with ThreadLimit sets the maximum configured value for MaxClients for the lifetime of the Apache process. Any attempts to change this directive during a restart will be ignored
workers ThreadLimit docs here