perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Scott <ds94...@earthlink.net>
Subject Re: Apache2::Status "Memory Usage" fails on Debian
Date Sat, 02 Dec 2006 02:22:47 GMT
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
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - - - - - - - - - - - - -
>
>
>


Mime
View raw message