You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Daniel Wilson <we...@animelab.com> on 2003/12/21 04:07:13 UTC
Shared memory broke ;.;
Moved my site to a new server.
Old Server
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
30056 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 0 httpd
30057 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 0 httpd
30058 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 1 httpd
30059 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 1 httpd
30060 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 0 httpd
New Server
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
2733 apache 16 0 12716 12M 3520 S 3.0 2.5 0:00 0 httpd
2731 apache 17 0 12668 12M 3500 S 2.3 2.5 0:00 0 httpd
2728 apache 18 0 11684 11M 3380 S 0.3 2.3 0:00 0 httpd
2718 apache 19 0 12296 12M 3460 S 0.0 2.4 0:00 0 httpd
2720 apache 24 0 12668 12M 3500 S 0.0 2.5 0:00 0 httpd
What the hell happened? Its not sharing the modules at start up and none of
the config or compile options have changed. Its even the same RedHat 9
install. The only thing different is the fact the old server has a custom
SMP kernel and the new has redhat's stock kernel.
Any clues what else it could be? Recompiling the kernel is the last thing i
want to do remotely.
Danni
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Carletto <ca...@yahoo.it>.
Tank you very much, Geoff!
Now the things comes to play right...!
Merry Christmas!!
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> I still having problem with this extra.last.conf.in.
> Please, if you want and have time, take a look to included TGZ stub package
> (I included in cause is small and, maybe, make clear my problem).
> TIA
>
>
YEAH!!!! finally, a user that submits a nice sample tarball for me to just
run!!! other users take note: making it easier for developers to help solve
your problems makes it more likely that your problems get solved. besides,
getting familiar with Apache-Test will help you in the long run :)
in this case it was easy: you only need one of extra.last.conf.in or
extra.conf.in. the former is loaded last after @INC is finalized, which is
what you want for PerlLoadModule (as well as any modules that use XS).
since both of your extra* files have the PerlLoadModule directive in them,
the first wins and throws the error. so, I copied your extra.conf.in to
extra.last.conf.in, removed extra.conf.in, and it worked.
well, almost. you should always add 'use Apache2;' to your Makefile.PL - it
does no harm if it's there and you don't need it, while making it possible
for all mod_perl 2.0 configurations to run your stuff out-of-the-box.
anyway, I'm glad Apache-Test is helping you. good luck.
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Carletto <ca...@yahoo.it>.
> moving back on-list so everyone can benefit :)
Yes, sorry.
> oh, I think I see what you mean. use t/conf/extra.last.conf.in instead of
> extra.conf.in - it will make sure your modules are loaded before the
config
> is parsed.
I still having problem with this extra.last.conf.in.
Please, if you want and have time, take a look to included TGZ stub package
(I included in cause is small and, maybe, make clear my problem).
TIA
Re: Testing custom configuration directives
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
moving back on-list so everyone can benefit :)
Carletto wrote:
>>I was assuming from the above that he already had Apache-Test working.
>>
>>--Geoff
>
>
> Yes, that is.
> The problem is: the configuration directives (expressed in Foo/Bar.pm as
> explained in Chap.6 of
> "User's guide" mod_perl 2.0 written by Stas) doesn't wokr in Apache-Test,
> where simply installed
> there aren't any
> blem..:(
> So if I want test *my* configuration directives (for some values, fo example) I need the "silly" work
> around "Perl{Set|Add}Var" in t/conf/extra.conf.in.
> The heart of the problem seems to be the use of "PerlLoadModule" in t/conf/extra.conf.in
> (when used in a live Apache environmnet works well, very well). Suggesitons ?
oh, I think I see what you mean. use t/conf/extra.last.conf.in instead of
extra.conf.in - it will make sure your modules are loaded before the config
is parsed.
HTH
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>> # file t/conf/extra.conf.in
> Carletto is talking about the live testing of a module that won't work
> without running mod_perl and he is not aware of Apache-Test, required
> for this kind of tests.
I was assuming from the above that he already had Apache-Test working.
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
> Carletto wrote:
>
>>Hi!
>>Anyone has experience in testing an Apache module (mod_perl 2.0, of course)
>>with
>>custom configuration directives ?
>>I'm talking about a module "packaged" (h2xs -AX -n Foo::Bar) and then tested
>>(perl Makefile.PL; make; make test), when as custom configuration is like
>>that:
>>
>># file t/conf/extra.conf.in
>>PerlModule Foo::Bar
>>#PerlLoadModule Foo::Bar # if uncommented catch an error when "make test"
>><Location /foo>
>> MyFoo 30
>> SetHandler modperl
>> PerlRequestHandler Foo::Bar
>></Location>
>>
>>Obviously the variable MyFoo is corrected "handled" in Foo/Bar.pm (see
>>mod_perl 2.0 User's guide ch.6 for
>>more details) but seems to be not work under a "packaged" module.
>>So I can't test... only testing "by hand" (orribly long time operation..).
>>
>
>
> I don't really understand what you mean by all this. are you saying you want
> to test whether MyFoo is "30" via "make test"?
>
> that's fairly simple to do. just use the "test from within a handler"
> approach when planning your tests - see
> t/response/TestDirective/perlloadmodule.pm for an example that is custom
> directive specific.
>
> if you're talking about testing something else, if you could take a moment
> to re-explain your issue I'm sure we can give you what you need.
Carletto is talking about the live testing of a module that won't work without
running mod_perl and he is not aware of Apache-Test, required for this kind of
tests.
Unfortunately apache.org is still down. But once it's up, Carletto please read:
http://perl.apache.org/docs/general/testing/testing.html
__________________________________________________________________
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
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Testing custom configuration directives
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Carletto wrote:
> Hi!
> Anyone has experience in testing an Apache module (mod_perl 2.0, of course)
> with
> custom configuration directives ?
> I'm talking about a module "packaged" (h2xs -AX -n Foo::Bar) and then tested
> (perl Makefile.PL; make; make test), when as custom configuration is like
> that:
>
> # file t/conf/extra.conf.in
> PerlModule Foo::Bar
> #PerlLoadModule Foo::Bar # if uncommented catch an error when "make test"
> <Location /foo>
> MyFoo 30
> SetHandler modperl
> PerlRequestHandler Foo::Bar
> </Location>
>
> Obviously the variable MyFoo is corrected "handled" in Foo/Bar.pm (see
> mod_perl 2.0 User's guide ch.6 for
> more details) but seems to be not work under a "packaged" module.
> So I can't test... only testing "by hand" (orribly long time operation..).
>
I don't really understand what you mean by all this. are you saying you want
to test whether MyFoo is "30" via "make test"?
that's fairly simple to do. just use the "test from within a handler"
approach when planning your tests - see
t/response/TestDirective/perlloadmodule.pm for an example that is custom
directive specific.
if you're talking about testing something else, if you could take a moment
to re-explain your issue I'm sure we can give you what you need.
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Mixing Apache and normal tests
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>
> Carletto wrote:
>
>>Hi all,
>>anyone has experience (or tips) about the following problem ?
>>
>>Problem:
>> I have a package that covers a wide project, some classes, some scripts,
>>some binaries,
>> and finally some Apache modules (mod_perl 2.0 with Apache-2.0.48).
>> When executing the tests (some for classes, some for scripts, ...) with
>>a classic "make test"
>> the problem rise: the Makefile use Test::Harness XOR Apache::Test ?
>
>
> Apache-Test can run apache-based tests or normal perl-only tests, so if
> Apache-Test is available you can just let it run everything.
>
> see
>
> http://search.cpan.org/~dwheeler/MasonX-Interp-WithCallbacks-1.11/
>
> for an example of a module that has both apache and non-apache tests - it
> will skip the apache tests if Apache-Test is not present, but otherwise it
> runs them all.
Sounds like something that needs to be added to testing.pod, as this questions
gets asked more than once.
__________________________________________________________________
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
Re: Mixing Apache and normal tests
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Carletto wrote:
> Hi all,
> anyone has experience (or tips) about the following problem ?
>
> Problem:
> I have a package that covers a wide project, some classes, some scripts,
> some binaries,
> and finally some Apache modules (mod_perl 2.0 with Apache-2.0.48).
> When executing the tests (some for classes, some for scripts, ...) with
> a classic "make test"
> the problem rise: the Makefile use Test::Harness XOR Apache::Test ?
Apache-Test can run apache-based tests or normal perl-only tests, so if
Apache-Test is available you can just let it run everything.
see
http://search.cpan.org/~dwheeler/MasonX-Interp-WithCallbacks-1.11/
for an example of a module that has both apache and non-apache tests - it
will skip the apache tests if Apache-Test is not present, but otherwise it
runs them all.
HTH
--Geoff
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Mixing Apache and normal tests
Posted by Carletto <ca...@yahoo.it>.
Hi all,
anyone has experience (or tips) about the following problem ?
Problem:
I have a package that covers a wide project, some classes, some scripts,
some binaries,
and finally some Apache modules (mod_perl 2.0 with Apache-2.0.48).
When executing the tests (some for classes, some for scripts, ...) with
a classic "make test"
the problem rise: the Makefile use Test::Harness XOR Apache::Test ?
TIA,
Carletto.
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Testing custom configuration directives
Posted by Carletto <ca...@yahoo.it>.
Hi!
Anyone has experience in testing an Apache module (mod_perl 2.0, of course)
with
custom configuration directives ?
I'm talking about a module "packaged" (h2xs -AX -n Foo::Bar) and then tested
(perl Makefile.PL; make; make test), when as custom configuration is like
that:
# file t/conf/extra.conf.in
PerlModule Foo::Bar
#PerlLoadModule Foo::Bar # if uncommented catch an error when "make test"
<Location /foo>
MyFoo 30
SetHandler modperl
PerlRequestHandler Foo::Bar
</Location>
Obviously the variable MyFoo is corrected "handled" in Foo/Bar.pm (see
mod_perl 2.0 User's guide ch.6 for
more details) but seems to be not work under a "packaged" module.
So I can't test... only testing "by hand" (orribly long time operation..).
Any suggestions/critics/wishes ?
TIA
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Shared memory broke ;.;
Posted by Perrin Harkins <pe...@elem.com>.
Daniel Wilson wrote:
> Its not sharing the modules at start up and none of
> the config or compile options have changed.
You diff'ed httpd.conf and startup.pl and found no differences at all?
> The only thing different is the fact the old server has a custom
> SMP kernel and the new has redhat's stock kernel.
I suppose it's possible that the two kernels have a different approach
to calculating memory usage. Doesn't seem likely though. Are you sure
you used the same Perl, same apache, same mod_perl, etc.? Double-check
them.
- Perrin
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: Shared memory broke ;.;
Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,
On Sat, 20 Dec 2003, Daniel Wilson wrote:
> Moved my site to a new server.
>
> Old Server
> PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
> 30056 apache 9 0 10964 10M 10288 S 0.0 0.7 0:00 0 httpd
> New Server
> 2733 apache 16 0 12716 12M 3520 S 3.0 2.5 0:00 0 httpd
>
> What the hell happened?
You didn't tell us much about the servers.
Did you have more memory in the old one?
> Recompiling the kernel is the last thing i want to do remotely.
You can do it if you're careful. I do.
73,
Ged.
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html