Ubuntu – ServerLimit and MaxClient issue

apache-2.2Ubuntu

I've been trying to raise my MaxClients in apache for quite a high traffic site..

But I kept receiving this error:

WARNING: MaxClients of 565 exceeds ServerLimit value of 256 servers,
 lowering MaxClients to 256.  To increase, please see the ServerLimit
 directive.
Syntax OK

So after some searching, I've included:

    StartServers        5
    MinSpareServers     15
    MaxSpareServers     30
    ServerLimit         565
    MaxClients          565
    MaxRequestsPerChild 2000

After doing a graceful restart the warning didn't occur, and everything seemed OK.

However, after checking my apache error.log – the Warning still exists.

** [notice] Graceful restart requested, doing restart
WARNING: MaxClients of 565 exceeds ServerLimit value of 256 servers,
 lowering MaxClients to 256.  To increase, please see the ServerLimit
 directive.
** [warn] WARNING: Attempt to change ServerLimit ignored during restart

Would the ServerLimit taken affect? as the Graceful restart worked… Can anyone shed some light?

Cheers!

Best Answer

I think you will need to do a stop and start of httpd (so that the "master" httpd process is stopped and started, not just the child processes). From the Apache documentation's entry on ServerLimit:

"Any attempts to change this directive during a restart will be ignored, but MaxClients can be modified during a restart."