Apache2::Resource
am 01.04.2010 01:55:42 von ArthurG
Hi users@httpd
As I mentioned in an earlier email, we're running mod_perl on Apache
(2.2) on RHEL, using the prefork MPM. I want to protect my server
against Perl processes that grow much too large, as they can slow or
even freeze the system.
Therefore, I'm using Apache2::Resource, adding the following to
httpd.conf:
> PerlModule Apache2::Resource
> # set child memory limit to 1000 megabytes
> # RLIMIT_AS (address space) will work to limit the size of a process
> PerlSetEnv PERL_RLIMIT_AS 1000
> PerlChildInitHandler Apache2::Resource
httpd processes die as expected when their VM size reaches 1000 MB.
But here's the problem. After the httpd serving the Request dies, a
new one is created to handle the same request. And so on.
I think this is all done in Apache, as the access log doesn't show
another request from the client. Is this correct?
How can I limit the number of 'retries' of the failing request? Is
there an Apache directive?
And I'm still looking for a way to 'catch' the exception when the
process dies.
Regards
Arthur
Arthur P. Goldberg, PhD
Research Scientist in Bioinformatics
Plant Systems Biology Laboratory
www.virtualplant.org
Visiting Academic
Computer Science Department
Courant Institute of Mathematical Sciences
www.cs.nyu.edu/artg
artg@cs.nyu.edu
New York University
212 995-4918
Coruzzi Lab
8th Floor Silver Building
1009 Silver Center
100 Washington Sq East
New York NY 10003-6688
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Apache2::Resource
am 01.04.2010 02:14:45 von Eric Covener
On Wed, Mar 31, 2010 at 7:55 PM, ARTHUR GOLDBERG wrote:
> httpd processes die as expected when their VM size reaches 1000 MB.
>
> But here's the problem. After the httpd serving the Request dies, a new one
> is created to handle the same request. And so on.
> I think this is all done in Apache, as the access log doesn't show another
> request from the client. Is this correct?
That doesn't sound right at all. You'll get a replacement if your
prefork config and the load dictates one, but it doesn't pick up where
the other left off. The request is lost (since none of them ever end,
you might not see an access log entry at all. Try it with wget)
--
Eric Covener
covener@gmail.com
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: Apache2::Resource
am 01.04.2010 22:08:46 von ArthurG
Eric
Good point. Further investigation (snooping with tcpdump) shows that
the browser (Firefox 3.5.9) sometimes retries the request. The number
of retries appears random.
I don't think we've client-side (javascript) code retrying requests,
but I don't know.
BR
A
PS. Note that for wget:
>
> -t number
> --tries=number
> Set number of retries to number.
On Mar 31, 2010, at 8:14 PM, Eric Covener wrote:
> On Wed, Mar 31, 2010 at 7:55 PM, ARTHUR GOLDBERG
> wrote:
>
>> httpd processes die as expected when their VM size reaches 1000 MB.
>>
>> But here's the problem. After the httpd serving the Request dies, a
>> new one
>> is created to handle the same request. And so on.
>> I think this is all done in Apache, as the access log doesn't show
>> another
>> request from the client. Is this correct?
>
> That doesn't sound right at all. You'll get a replacement if your
> prefork config and the load dictates one, but it doesn't pick up where
> the other left off. The request is lost (since none of them ever end,
> you might not see an access log entry at all. Try it with wget)
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See 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
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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