httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emma Lovatt" <>
Subject RE: [users@httpd] ServerLimit
Date Mon, 20 Nov 2006 16:43:45 GMT
Thanks for your help I really appreciate it :)


-----Original Message-----
From: Sander Temme [] 
Sent: 20 November 2006 16:36
Subject: Re: [users@httpd] ServerLimit

Hi Emma,

On Nov 20, 2006, at 7:54 AM, Emma Lovatt wrote:

> I have read some conflicting information on how to up the max_clients
> directive.

There's really only one way: in the configuration file. See conf/ 
extra/httpd-mpm.conf for suggestions.

> Could someone explain the process to me a little better if possible or
> point me in the direction of some docs,  I am really struggling to  
> find
> some decent documentation on this.

You should not need to muck in the source code: tuning the  
ServerLimit and MaxClients directives should be all you need.  For  
instance, if you want a maximum of 1024 child processes, tell Apache:

ServerLimit 1024
MaxClients 1024

There is, however, something screwy going on: the order of these  
directives in the configuration file matters!  The code that  
implements the MaxClients directive checks the internal value of the  
ServerLimit directive at that time, and if that hasn't been set yet  
it'll emit the following warning:

WARNING: MaxClients of 1024 exceeds ServerLiimit value of 256 server,
  lowering MaxClients to 256.  To increase, please see the ServerLimit

Switch the above around, restart your server and you'll see this  
happen until you switch it back. And they'll still both show up as  
1024 in mod_info!  Quite maddening if you don't know what's going on.

> Here is the part of the prefork.c I think I have to tweak :).
> #endif

Once again, you shouldn't need to tune at compile time. However, if  
you desperately want to do so, yes this is the value to tweak.

The eventual value should be in relation to your memory, CPU, bus and  
network power. Find out using top how much memory each process takes  
(note that there is a shared memory portion that only gets allocated  
once across all processes) and divide that across the total available  
memory. However, you probably shouldn't go too high because you'll  
run into CPU, bus and mutex concurrency issues before you run out of  
memory. The kernel will use extra RAM as file system cache, so it's  
never wasted.


Open Source Software Consultant
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This e-mail (and any attachments) is confidential and may be privileged. If you are not the
intended recipient do not copy, use, or rely on them.
We do not accept any legal responsibility for the contents of this communication due to the
generally insecure nature of email.
The views and opinions expressed within this email are those of the author and are not necessarily
those of 'Piccadilly Ticketline' or any subsidiary.
If you received this email in error, please notify us immediately. PiccadillyTicketline has
taken every reasonable precaution to ensure that any attachment to this e-mail has been swept
for viruses.
However, Ticketline cannot accept liability for any damage sustained as a result of software
viruses and would advise that you carry out your own virus checks before opening any email
or attachment.

- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message