httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Coby" <>
Subject Re: [users@httpd] how can I log earlier in request loop
Date Mon, 31 Mar 2003 17:15:29 GMT
> My web server is randomly crashing, with the hardware actually locking
> up beyond the point where I can even get a console prompt (HP-UX).  In
> the web error log is the dreaded "[error] server reached MaxClients
> setting, consider raising the MaxClients setting", implying that one
> possible cause of failure is in effect a DoS - too may requests for the
> number of children allowed.

More than likely you are allowing Apache to spawn more children than can fit
into memory.  Is MaxClients * (nominal memory usage - nominal shared mem) <
Total RAM?

nominal mem usage and shared mem size can only be only be determined by
sitting there and watching `top` to see what your server uses.  For example,
I have a usage range of 4-24mb per process, with the 90th percentile at
about 12mb.  4mb is nominally shared.  Which gives me a total nominal memory
usage of 8mb.  I have 768mb ram, so I can handle up to 96 clients fairly

Once you exceed your total memory, the server starts swapping, which causes
responses to slow.  Slow response = people hitting reload.  More requests
come in, apache spawns more processes.  Eventually, you've got MaxClients
all swapping heavily, DoSing your server.

Make sure you aren't being [D]DoS'ed (check logs)
Add more ram
lower MaxClients
split your webserving across multiple servers


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