As the name suggests, you use the MaxClients directive to specify the maximum number of client connections that will be allowed on the Apache Web server. The httpd listener processes handle client connections. Each listener process is allocated a client connection. The maximum number of listener processes that are set in Apache is 150. However, it is possible to increase the value of this figure depending on the Web traffic your Web server handles. However, increase the value of the MaxClients directive only after considering the following:
- Be sure that your computer’s hardware configurations can handle the higher number of client requests. No matter how powerful Apache is, you are always dependent on your hardware limitations. Therefore, it is preferable to opt for a faster CPU, a fast disk I/O, and extra RAM.
- Make whatever value you decide to set for the MaxClients directive 25 percent more than the expected network traffic. This will reduce the chances of the system crashing because of increased server processes.
- If a Web site hosted on your server is very busy and the default of 150 server processes won’t be enough for you, use another physical server on the network.
- Set the MaxClients directive to a lower number if you are running Apache on a server with limited hardware resources. For example, if you are running the Apache server on a computer with 32MB or 64MB of RAM, set a lower value for MaxClients to prevent a server crash.
When you have sufficient experience with the Apache Web server you will be able to set the correct value for this directive. If you’re new to Apache, you might want to indulge in some experimentation to reach the optimal figure for this directive.
|Caution||If, after a lot of research and experimentation, you set the optimal value for the MaxClients directive but your system still crashes, decrease the number specified in this directive. You don’t want to lose data because of a system crash.|