Search This Blog

Loading...

Thursday, January 15, 2009

Apache - MaxClients of 1000 exceeds ServerLimit value of 256 servers.





Due to the election day, yesterday our apache cluster was not able to serve all the requests so we need to raise
MaxClients paramenter on each node. Unfortunatly the new value was exceeding the ServerLimit value so we had to raise it accordingly. Despite this on restart apache was again complaining that MaxClients was exceeding ServerLimit value:
# /etc/init.d/apache2 restart
* Forcing reload of web server (apache2)...
WARNING: MaxClients of 1000 exceeds ServerLimit value of 256 servers,
lowering MaxClients to 256. To increase, please see the ServerLimit
directive.
These are the interesting lines in /etc/apache2/apache2.conf. Can you see something wrong here? It was hard for me to figure out how to fix the problem!

StartServers 10
MinSpareServers 10
MaxSpareServers 20
MaxClients 1000
ServerLimit 1000
MaxRequestsPerChild 0

Here the right one. The point is: ServerLimit must be put before MaxClients directive!

StartServers 10
MinSpareServers 10
MaxSpareServers 20
ServerLimit 1000
MaxClients 1000
MaxRequestsPerChild 0

Hope this help you!

4 comments:

  1. Thank you for posting this! Fixed my problem!!!!

    ReplyDelete
  2. Thank you. I was not understanding my problem either.

    ReplyDelete
  3. @hawk817: What is your problem?

    ReplyDelete
  4. Thanks. The order is important.

    StartServers 268
    MinSpareServers 256
    MaxSpareServers 1020
    ServerLimit 5100
    MaxClients 5000
    MaxRequestsPerChild 60

    ReplyDelete

LinkWithin

Related Posts with Thumbnails