You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/08/19 02:25:54 UTC

Apache::SizeLimit for mp2?

Hi Perrin,

Did you have a chance to trying to port Apache::SizeLimit to mp2? It's on 
of the items on the todo list for the 2.0 release. Thanks!

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> Thanks for getting the permissions changed.  The changes we discussed
> are committed.

:)

> One last thought about this: the Win32 support was sent in by some guys
> who used it with mp1 even though there was only a single thread, because
> apache would keep spawning a replacement thread for the one that had
> grown too big.  Now that Win32 is properly threaded, this is probably
> not a useful thing to support anymore.  Maybe we should just axe the
> Win32 stuff for the mp2 version, to avoid confusion?

I've no clue. May be Randy and Steve will know the answer?



-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Perrin Harkins <pe...@elem.com>.
Thanks for getting the permissions changed.  The changes we discussed
are committed.

One last thought about this: the Win32 support was sent in by some guys
who used it with mp1 even though there was only a single thread, because
apache would keep spawning a replacement thread for the one that had
grown too big.  Now that Win32 is properly threaded, this is probably
not a useful thing to support anymore.  Maybe we should just axe the
Win32 stuff for the mp2 version, to avoid confusion?

By the way, Stas, do you have a style guide or perltidy recipe that you
are following?  I normally just run perltidy -ce, but I'd be happy to
use something else if it will save other people time in the future.

- Perrin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Joe Schaefer wrote:
> "Perrin Harkins" <pe...@elem.com> writes:
> 
> 
>>Maybe I'm just not in the comitters list for this repository.
> 
> 
> You should be able to commit to any subdir in perl/modperl/docs.
> If you haven't done so yet, be sure to run svnpasswd on the 
> svn.apache.org host, otherwise svn won't recognize you.  More
> details are here
> 
>         http://www.apache.org/dev/version-control.html

He did. I guess he has no perms for the code rep.

Joe where did you check the perms? I want to document that, so we know in 
the future.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Perrin Harkins" <pe...@elem.com> writes:

> Maybe I'm just not in the comitters list for this repository.

You should be able to commit to any subdir in perl/modperl/docs.
If you haven't done so yet, be sure to run svnpasswd on the 
svn.apache.org host, otherwise svn won't recognize you.  More
details are here

        http://www.apache.org/dev/version-control.html

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
>>No. Because one can disable that:
>>http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
>>Moreover M-R works just fine with 'modperl' SetHandler if you use $r
>>methods.
> 
> 
> The assumption is that no one would use these methods if they had access
> to the config file, which is more efficient.  I'll put them back in
> though, and update the docs.

good point.

>>Try your commit rights again?
> 
> 
> My computer at work died this morning, so I just have e-mail while I try
> to recover it.  I will be able to try again when I get home.  I'm not
> hopeful though, since I did check out via https last time.  Maybe I'm just
> not in the comitters list for this repository.

With all the recent moves I'm not really sure where I can check that. 
Email the infrastructure/at/apache.org asking what's wrong?

In any case feel free to post patches and we will commit those.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Perrin Harkins <pe...@elem.com>.
> No. Because one can disable that:
> http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
> Moreover M-R works just fine with 'modperl' SetHandler if you use $r
> methods.

The assumption is that no one would use these methods if they had access
to the config file, which is more efficient.  I'll put them back in
though, and update the docs.

> Yes, I must be $r->pool.

Okay.

> Try your commit rights again?

My computer at work died this morning, so I just have e-mail while I try
to recover it.  I will be able to try again when I get home.  I'm not
hopeful though, since I did check out via https last time.  Maybe I'm just
not in the comitters list for this repository.

- Perrin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
>>I've massaged a bit more the ported SizeLimit.pm, but I've a question
>>regarding:
>>
>>sub setmax {
>>     $MAX_PROCESS_SIZE = shift;
>>     my $r = Apache->request();
>>
>>and similar:
>>
>>sub setmin {
>>sub setmax_unshared {
>>
>>Since Apache->request() is not longer available by default, should we
>>change the API to pass $r as the first argument? or may be the second?
>>
>>setmax($MAX_PROCESS_SIZE, $r);
>>setmax($MAX_PROCESS_SIZE); # here will try to use Apache->request()
> 
> 
> I did that, but then I took it out.  Those subs are only meant to be
> called from ModPerl::Registry and friends.  In that situation, you have
> Apache->request() by default in a prefork environment, don't you?  As a
> result of SetHandler perl-script?

No. Because one can disable that:
http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
Moreover M-R works just fine with 'modperl' SetHandler if you use $r methods.

> If you want to put it back in, that's fine.  The docs would need to
> mention it though.

Certainly.

> I had a separate question about the cleanup handler.  I used
> $r->connection->pool->register_cleanup(), but I wonder if I should have
> used $r->pool->register_cleanup() instead to make it check after every
> request.  Thoughts?

Yes, I must be $r->pool. Try your commit rights again?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Perrin Harkins <pe...@elem.com>.
> I've massaged a bit more the ported SizeLimit.pm, but I've a question
> regarding:
>
> sub setmax {
>      $MAX_PROCESS_SIZE = shift;
>      my $r = Apache->request();
>
> and similar:
>
> sub setmin {
> sub setmax_unshared {
>
> Since Apache->request() is not longer available by default, should we
> change the API to pass $r as the first argument? or may be the second?
>
> setmax($MAX_PROCESS_SIZE, $r);
> setmax($MAX_PROCESS_SIZE); # here will try to use Apache->request()

I did that, but then I took it out.  Those subs are only meant to be
called from ModPerl::Registry and friends.  In that situation, you have
Apache->request() by default in a prefork environment, don't you?  As a
result of SetHandler perl-script?

If you want to put it back in, that's fine.  The docs would need to
mention it though.

I had a separate question about the cleanup handler.  I used
$r->connection->pool->register_cleanup(), but I wonder if I should have
used $r->pool->register_cleanup() instead to make it check after every
request.  Thoughts?

- Perrin



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Hi Perrin,

I've massaged a bit more the ported SizeLimit.pm, but I've a question 
regarding:

sub setmax {
     $MAX_PROCESS_SIZE = shift;
     my $r = Apache->request();

and similar:

sub setmin {
sub setmax_unshared {

Since Apache->request() is not longer available by default, should we 
change the API to pass $r as the first argument? or may be the second?

setmax($MAX_PROCESS_SIZE, $r);
setmax($MAX_PROCESS_SIZE); # here will try to use Apache->request()

I suppose this is a better approach, since it won't break the existing 
code, making $r optional.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Stas Bekman <st...@stason.org>.
Perrin Harkins wrote:
> Stas Bekman said:
> 
>>Did you have a chance to trying to port Apache::SizeLimit to mp2?
> 
> 
> Not yet.  I'm in Maine on vacation this week, but will look at it when I
> get back.

ping

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Apache::SizeLimit for mp2?

Posted by Perrin Harkins <pe...@elem.com>.
Stas Bekman said:
> Did you have a chance to trying to port Apache::SizeLimit to mp2?

Not yet.  I'm in Maine on vacation this week, but will look at it when I
get back.
- Perrin



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org