On Mon, 2003-11-17 at 11:02, Brendan W. McAdams wrote: > We have about 90% of our 20 modules in a non-preload > state, and have never had a problem.
Depending on how likely these are to get called and how much they increase the memory footprint, you might save significant amounts of RAM by preloading them where possible (i.e. avoiding Inline::Java ones). > However, with this project, PostBlotter and ONLY PostBlotter began > exhibiting random (maybe 4 out of 10 requests?) 500 errors - with an > error log note of: > Undefined subroutine > &Apache::MuniCenter::MarkupMatrix::PostBlotter::handler called. This is just getting called directly by mod_perl when you call a URL that is mapped to it? > At this point I need to know WHY mod_perl randomly can't find the > handler, which is properly written, runs through perl -c cleanly, under > strict and warnings, and has a 1; at the bottom. One possible answer is that @INC is different at that time, but it's hard to find out since the call is being made from C. > Are there any known issues that could cause this? Any easy way to > produce a trace of where Apache is looking and what's happening > (preferably not a recompile of apache - a trace perl module I can load > would be better). If you can reproduce it reliably, you can use strace. Another low-tech approach would be to make a simple handler like this: package PostBlotterLoader; use strict; use warnings; sub handler { eval { require Apache::MuniCenter::MarkupMatrix::PostBlotter; &Apache::MuniCenter::MarkupMatrix::PostBlotter::handler; }; if ($@) { warn "load failure: @INC is " . @INC . " and %INC is " . %INC; # maybe try again here? } } You can preload that handler, and map the URLs that should go to PostBlotter to this instead. - Perrin -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html