httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Coby" <jc...@listingbook.com>
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
safely.

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.

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

-Jacob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message