[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: Getting at server's MaxClients setting?
From: Geoffrey Young <geoff () modperlcookbook ! org>
Date: 2002-11-27 15:05:13
[Download RAW message or body]
Bas A.Schulte wrote:
> Geoff,
>
> On Wednesday, November 27, 2002, at 03:07 PM, Geoffrey Young wrote:
>
>> in this case, MaxClients looks like it calls ap_daemons_limit to make
>> the setting, so you may be able to create a subclass that offers up
>> that API to perl-land. for more information on how, you can check out
>> the slides from my recent ApacheCon talk:
>>
>> http://www.modperlcookbook.org/~geoff/slides/ApacheCon/oo-mod_perl-printable.
>>
>> ppt.gz
>>
>> hmm... sounds like another good idea to add to my next talk :)
>
>
> Well, for the moment, I'll grep for it in the current httpd.conf ;)
>
> Just thought I'd ask in case I was missing something obvious.
nope, you didn't miss anything. unfortunately, mod_perl 1.X does not
offer up the entire Apache API to perl land (though the intent of 2.0
is to do just that).
actually, I just whipped up a module that offers get/set for MaxClients:
http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-MaxClients-0.01.tar.gz
it's not perfect (it doesn't offer the checks that the MaxClients
directive does), but it seems to work. with a little effort, I
suspect it could be worked out so that you don't need a request
object, but rather an Apache::Server object. however, it shows how
easy mod_perl makes it to open up the Apache API where you need it.
--Geoff
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic