perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Estep" <ges...@thinkronize.com>
Subject RE: Problem with mod_perl
Date Fri, 02 Jun 2000 01:21:24 GMT

On Fri, 26 May 2000, Eugene S. Panenko wrote:

> Hi all,
>
> Sorry if it is an incorrect list to ask...
>
> I have a strange problem with mod_perl. I've tested mod_perl using a very
> simple scripts (one of them is attached). The network load is emulated via
LAN
> using a special proggy. The problem is: under load above 20 requests per
second
> after working some time (about 15-30 sec) Apache daemon stopts accepting
new
> connections and blocks forever (without -X option httpd at this moment
begin
> forking until it eats all resources) . I've found that the problem exists
> only when scripts use modules (tested with CGI v 2.46, IPC::Shareable, our
own
> modules).  Test scripts without modules work fine even under load of 200
> requests per second.


Without knowing too much about your apache config. files, machine specs,
etc. I am guessing that your Apache MaxClients is still set at 150 (the
out-of-the-box value).

When apache receives a request that it cannot immediately handle (all of the
pre-forked process are busy) it will fork another one (up to MaxClients).
Eventually, you will run out of physical memory and begin to hit your swap
space.  When this happens, it takes longer to handle a request.  That causes
more requests to back up in the queue, so apache forks some more processes
to handle the load. These new processes increase the amount of swapping that
needs to be done, and the situation gets out of control.

How many subprocesses you can support depends upon the size of your httpd
process's text and data segments.  I have seen several mod_perl applications
increase the size of an httpd process to over 10 Mbytes.  If you set
MaxClients to a number that can be safely stored in physical memory
(adjusting for the OS and other processes running on the machine, of course)
you might eliminate your problem.

--
Greg Estep <gestep@thinkronize.com>


Mime
View raw message