Explanation Of MaxClients Directive

MaxClients will define the maximum connections that could be opened to the Apache web server, any connections higher that amount will be qued until the open remaining connections get closed, and the amount of time that this connection request can wait is depended on the value of timeout directive.

Why configure MaxClients directive

If there were so many connections waiting for reply from apache occurred will cause apache go down and if it was continuous will cause apache go down repeatedly and seems to your visitors that the server is not powerful that it is really not and it is just a misconfiguration.

Needed Module To Be Compile With Apache

MaxClients is a directive of mpm_worker and mpm_prefork apache module that they must be compiled and enabled with apache so that this directive can work.

Assigning MaxClients A Value

You can assign a value to MaxClients to change connection limit in this structure

MaxClients number

you should define MaxClients in apache global configuration that is hitpd.conf or in external text files that are included in httpd.conf enclosed by worker or prefork module definitions.

MaxClients 600

or

MaxClients 600

The maxclients value must be Lower than ServerLimit directive value.ServerLimit should be defiend uper than MaxClients directive definition inclosed by mpm worker or prefork directives.

MaxClients default value and cause of apache go down repeatedly

The default value for maxclients is 256 and according to what was said on earlier if there were an amount of requests to your web server higher than 256, let say 300, the 256 are being served and the ramaining 44 connections will be qued and stand for those active connections to be served and closed.let say 10 connections have served and will be got closed. so 10 of those 44 qued connections will be connected to the webserver and now there are 34 qued connections.if the qued connections arose forexample to 200 will cause apache go down permanently.

MaxClients is just only one directives of those that should be used for optimizing apache preformance that i have discusted them earlier in the following post:
how to optimize apache?

voshka

2 COMMENTS

  1. hello woshka … I hope success every day …
    so good .. you are very active .and you update youre bloge very fast !
    that’s to cause I cant read youre blog complete !
    slow plz !
    youre posts is useful for me and I love thats and you also !!
    bye …

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.