Re: [Mason] Pesky apache children (Or: Can't locate object method "make_ah" via package "Apache" - errors)
- On Mon, May 05, 2003 at 08:06:28PM +0200, harm wrote:
> Hello,(Original post to the Mason list but CC to the mod_perl list added as this
> one site or ours uses a mixture of Mason (1.16, mod_perl 1.27, 5.6.1) and pure
> mod_perl handlers. A nice mixture of ease-of-use (Mason) and complete
> control (the handlers)
> But, every now and then one of the apache children decides its has had enough
> and starts spewing these errormessages:
> (19880) Req for /wgdoc/vraagcv.html . Size: 19816.
>  make_ah for Apache=SCALAR(0x9269acc).
> [Mon May 5 09:12:47 2003] [error] Can't locate object method "make_ah" via package "A
> pache" (perhaps you forgot to load "Apache"?) at (eval 2021) line 5.
> The first two lines are debug messages. '19880' is the PID.
> Normal requests look like:
> (19880) Req for /misc/scroll_wn.html . Size: 19816.
>  make_ah for HTML::Mason::ApacheHandler.
> the code in HTML::Mason::ApacheHandler is: (default Mason eval code)
> sub handler %s
> my ($package, $r) = @_;
> print STDERR "[$$] make_ah for $package.\n";
> my $ah = $AH || $package->make_ah($r);
> return $ah->handle_request($r);
> Thus, the handler() routine gets a scalar in stead of package name! Weird. Once an
> apache child starts doing this the child is lost, only a apache restarts helps. Although this happens a few times a day I have not been able to reproduce it myself.
> The relevant part from httpd.conf (non trivial, hence included):
> SetHandler perl-script
> PerlHandler NVB2::Core::Handler HTML::Mason::ApacheHandler
> PerlLogHandler NVB2::Core::LogHandler
> The 'NVB2::Core::Handler' handles the request or returns a 'DECLINE'
> (and lets Mason do the work)
> Maybe anyone has a clue? The only mention in the docs having to do with make_ah is something with PerlFreshRestart, which does not seem related (nor works. Yes, I tried :)
seems to be a non Mason specific problem)
Reply to my own question:
The above solution used a stacked PerlHandler. First mod_perl got a change
to handle te request. Otherwise it would return 'DECLINE' and Mason could
I split the setup in two seperate backend apaches. One pure mod_perl handler
and one Mason only. Rewrite rules in the frontend decide which apache gets which request.
Thisway there is no need for the stacked PerlHandler and everything has
been working as mod_perl usualy works.
The Moon is Waxing Crescent (48% of Full)