You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jonathan <mo...@2xlp.com> on 2006/12/01 00:14:11 UTC
Re: Apache2::Status "Memory Usage" fails on Debian
On Nov 30, 2006, at 5:58 PM, David Scott wrote:
> This is not a good Apache day. I already sent out a message
> regarding an Apache::Scoreboard problem, and now Apache2::Status
> doesn't work either.
it's a bug, but i think its platform specific/ odd
i ran into the same thing a while back
check out this:
http://comments.gmane.org/gmane.comp.apache.mod-perl/24906
i have 2 posts at the bottom, which i'll just paste here:
=====
Jonathan | 13 Aug 00:46
I'm finding some issues with the 2 modules
i think some of it happens when you have a module that has no
subroutines ( ie , a namespace placeholder or something )
check out ~ line 551 in Apache2::Status
adding a few over-the-top checks seems to help, and gets memory use
working on more items
} (sort { $subs->{$b}->{size} <=> $subs->{$a}->{size} } keys %
$subs);
+ return if ! scalar <at> keys;
+ return if ! defined $subs->{$keys[0]};
+ return if ! defined $subs->{$keys[0]}->{count};
+ return if ! defined $subs->{$keys[0]}->{size};
my $clen = length $subs->{$keys[0]}->{count};
my $slen = length $subs->{$keys[0]}->{size};
i'll have more fixes as time progresses
======
Jonathan | 13 Aug 00:56
ok, also found
I also figured this out:
in B::TerseSize, line 634
- my $script = $q->script_name;
+ my $script ;
+ if ( defined $q && $q )
+ {
+ $script = $q->script_name;
+ }
Killing that makes a lot more things work too.
The only caveat of that, is that 'memory usage' doesn't appear on /
perl-status/ until you visit a symdump page that contains memory-
usage. i don't know why. but that should only happen on situations
already afflicted by the other bug. so its a stupid new bug instead
of a bad old one.
==========
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
Re: Apache2::Status "Memory Usage" fails on Debian
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
David Scott wrote:
> The following patch makes life a lot easier:
>
> in B::TerseSize:
>
> 631c631
> < my $script = $q->script_name;
> ---
> > my $script = ( defined $q && $q ) ? $q->script_name : $r->uri;
>
> The problem is, the Apache 2 API doesn't use CGI query objects at all so
> you can't use the script name.
my $script = MP2 ? $r->uri : $q->script_name;
is better I think.
This will be in the very soon to be released B-Size 0.09
and I'll update mp2 svn to depend on a minium version of 0.09 for
B::TerseSize which is in the B-Size CPAN module.
Thanks John, Scott.
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF
I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.
Re: Apache2::Status "Memory Usage" fails on Debian
Posted by David Scott <ds...@earthlink.net>.
The following patch makes life a lot easier:
in B::TerseSize:
631c631
< my $script = $q->script_name;
---
> my $script = ( defined $q && $q ) ? $q->script_name : $r->uri;
The problem is, the Apache 2 API doesn't use CGI query objects at all so
you can't use the script name.
d
Jonathan wrote:
>
> On Nov 30, 2006, at 5:58 PM, David Scott wrote:
>
>> This is not a good Apache day. I already sent out a message
>> regarding an Apache::Scoreboard problem, and now Apache2::Status
>> doesn't work either.
>
> it's a bug, but i think its platform specific/ odd
>
> i ran into the same thing a while back
>
> check out this:
>
> http://comments.gmane.org/gmane.comp.apache.mod-perl/24906
>
> i have 2 posts at the bottom, which i'll just paste here:
>
> =====
> Jonathan | 13 Aug 00:46
>
> I'm finding some issues with the 2 modules
>
> i think some of it happens when you have a module that has no
> subroutines ( ie , a namespace placeholder or something )
>
> check out ~ line 551 in Apache2::Status
>
> adding a few over-the-top checks seems to help, and gets memory use
> working on more items
>
> } (sort { $subs->{$b}->{size} <=> $subs->{$a}->{size} } keys %
> $subs);
>
> + return if ! scalar <at> keys;
> + return if ! defined $subs->{$keys[0]};
> + return if ! defined $subs->{$keys[0]}->{count};
> + return if ! defined $subs->{$keys[0]}->{size};
>
> my $clen = length $subs->{$keys[0]}->{count};
> my $slen = length $subs->{$keys[0]}->{size};
>
> i'll have more fixes as time progresses
>
> ======
>
> Jonathan | 13 Aug 00:56
>
> ok, also found
>
> I also figured this out:
>
> in B::TerseSize, line 634
>
> - my $script = $q->script_name;
>
> + my $script ;
> + if ( defined $q && $q )
> + {
> + $script = $q->script_name;
> + }
>
> Killing that makes a lot more things work too.
>
> The only caveat of that, is that 'memory usage' doesn't appear on /
> perl-status/ until you visit a symdump page that contains memory-
> usage. i don't know why. but that should only happen on situations
> already afflicted by the other bug. so its a stupid new bug instead
> of a bad old one.
>
> ==========
>
>
>
> // Jonathan Vanasco
>
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - -
> | FindMeOn.com - The cure for Multiple Web Personality Disorder
> | Web Identity Management and 3D Social Networking
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - -
> | RoadSound.com - Tools For Bands, Stuff For Fans
> | Collaborative Online Management And Syndication Tools
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - -
>
>
>