2 init handlers

2005-11-05 Thread JT Smith
My modperl app has its own init handler, but I'd also like to use Apache2::Reload on my 
dev box so I don't have to continue restarting Apache. Is it possible to register 2 init 
handlers through the Apache config? If not, is it possible to register them through 
code?


JT ~ Plain Black
ph: 703-286-2525 ext. 810
fax: 312-264-5382
http://www.plainblack.com

I reject your reality, and substitute my own. ~ Adam Savage


Re: 2 init handlers

2005-11-05 Thread Geoffrey Young


JT Smith wrote:
> My modperl app has its own init handler, but I'd also like to use
> Apache2::Reload on my dev box so I don't have to continue restarting
> Apache. Is it possible to register 2 init handlers through the Apache
> config? 

sure, slather on as many as you want

  PerlInitHandler My::Foo My::Bar
  PerlInitHandler My::Baz

and they'll all get run.  provided nobody throws an error, that is :)

the only place where this isn't true is for translation, authen/authz, and
mime setting phases, where you can register as many as you want but the
first one to return OK prevents the rest from being run.

> If not, is it possible to register them through code?

you can always use $r->push_handlers() to do that as well.

HTH

--Geoff


Questions about memory

2005-11-05 Thread Boysenberry Payne
Now that I'm at the tail end of my current project (not necessarily the 
best time to tackle

this issue I know) I'm looking at my httpd processes using top:

  PID COMMAND  %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  
VSIZE
16970 httpd0.0%  0:00.01   1 9   247   108K  17.5M  1.32M  
60.1M
16961 httpd0.0%  0:00.00   1 9   247   108K  17.5M  1.30M  
60.1M
16960 httpd0.0%  0:00.01   1 9   247   108K  17.5M  1.30M  
60.1M
16959 httpd0.0%  0:00.69   1 9   256  1.64M  17.4M  6.24M  
61.1M
16958 httpd0.0%  0:01.07   1 9   278  2.33M  17.4M  7.64M  
61.1M
16957 httpd0.0%  0:01.23   1 9   291  3.96M  17.7M  13.0M  
63.5M
13220 httpd0.0%  0:28.69   1 9   24732K  17.5M  11.6M  
60.1M


It gives a selection of used and non-used children (as well as root 
13220.)


Are they memory intensive?  I know it depends on the CPU, RAM, etc...
But what is big nowa days?  Am I looking at this with the wrong tool?

Basically I'm looking for pointers on how to tighten things up.  I'm 
hoping
to use this in a production environment and need to know when I need to 
scale

things up.

I'm a novice when it comes to memory management, sorry.  So as much
as as anyone can provide is much appreciated.

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com



Re: 2 init handlers

2005-11-05 Thread JT Smith
Thanks. I tried adding multiple lines worth and that didn't seem to work, not sure why. 
I didn't try putting multiple on the same line. I'll give that a shot.



sure, slather on as many as you want

 PerlInitHandler My::Foo My::Bar
 PerlInitHandler My::Baz

and they'll all get run.  provided nobody throws an error, that is :)





JT ~ Plain Black
ph: 703-286-2525 ext. 810
fax: 312-264-5382
http://www.plainblack.com

I reject your reality, and substitute my own. ~ Adam Savage


Re: 2 init handlers

2005-11-05 Thread Geoffrey Young


JT Smith wrote:
> Thanks. I tried adding multiple lines worth and that didn't seem to
> work, not sure why. I didn't try putting multiple on the same line. I'll
> give that a shot.

it shouldn't really matter - see hooks/TestHooks/stacked_handlers2.pm in the
mp2 test suite.  if the t/hooks/stacked_handlers2.t test passes then
something else must be going on somewhere in your handlers...

--Geoff


Re: Can't install libapreq2 on Fedora 2

2005-11-05 Thread Chris Grau
On Fri, Nov 04, 2005 at 03:00:30PM -0200, Victor Dias wrote:
> I did the same install on Fedora 4 with mod_perl-2.0.1-1.fc4.
> 
> cd libapreq2-2.06-dev
> perl Makefile.PL --with-apache2-apxs=/usr/sbin/apxs
> make
[snip]
> How can I install Mason without the Apache::Request dependency?
> I want to try the CGI mode now.
> The recomendation is to use CGI mode or modperl? What is better?
> 
> Any help?

If you're using Fedora Core 4, why not just use the packages available?

[EMAIL PROTECTED] ~]$ yum list \*libapreq2 perl-HTML-Mason
Setting up repositories
Reading repository metadata in from local files
Available Packages
libapreq2.i386   2.06-2.fc4 extras
perl-HTML-Mason.noarch   1.3101-3.fc4   extras
perl-libapreq2.i386  2.06-2.fc4 extras

As for installing on FC-2, if one wants to continue using the package
management system instead of compiling from source, well, one can do
both.  I recommend grabbing the source packages from FC-5 (development)
and building them on FC-2.  It should work fairly well.  I managed to do
it on Red Hat Linux 9 systems with minimal hassle.

-- 
Chris Grau <[EMAIL PROTECTED]>


pgp4PGYu14ZhR.pgp
Description: PGP signature


Re: Questions about memory

2005-11-05 Thread Jonathan


get a copy of the mod perl book on oreilly

this chapter is invaluable:
http://www.modperlbook.org/html/part2.html

read through it online or in the book.  it'll answer most of  your  
questions.


On Nov 5, 2005, at 3:06 PM, Boysenberry Payne wrote:

Now that I'm at the tail end of my current project (not necessarily  
the best time to tackle

this issue I know) I'm looking at my httpd processes using top:

  PID COMMAND  %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD   
RSIZE  VSIZE
16970 httpd0.0%  0:00.01   1 9   247   108K  17.5M   
1.32M  60.1M
16961 httpd0.0%  0:00.00   1 9   247   108K  17.5M   
1.30M  60.1M
16960 httpd0.0%  0:00.01   1 9   247   108K  17.5M   
1.30M  60.1M
16959 httpd0.0%  0:00.69   1 9   256  1.64M  17.4M   
6.24M  61.1M
16958 httpd0.0%  0:01.07   1 9   278  2.33M  17.4M   
7.64M  61.1M
16957 httpd0.0%  0:01.23   1 9   291  3.96M  17.7M   
13.0M  63.5M
13220 httpd0.0%  0:28.69   1 9   24732K  17.5M   
11.6M  60.1M


It gives a selection of used and non-used children (as well as root  
13220.)


Are they memory intensive?  I know it depends on the CPU, RAM, etc...
But what is big nowa days?  Am I looking at this with the wrong tool?

Basically I'm looking for pointers on how to tighten things up.   
I'm hoping
to use this in a production environment and need to know when I  
need to scale

things up.

I'm a novice when it comes to memory management, sorry.  So as much
as as anyone can provide is much appreciated.

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com