I'm getting a lot of strange errors when trying to run my scripts under mp2.

Things like:

   [Thu Dec 05 15:10:33 2002] [error] 1188: ModPerl::Registry: Goto undefined 
   subroutine &Carp::longmess_heavy at D:/Program Files/Perl/lib/Carp.pm line 
   98.   

and this is common:

   [Thu Dec 05 15:36:41 2002] [notice] Parent: child process exited with status 
   3221225477 -- Restarting.

and occasionally, it even dies on startup, before I even hit any of my scripts:

   [Thu Dec 05 15:14:31 2002] [error] Can't load Perl file: D:/Program 
   Files/Apache/conf/startup.pl for server 192.168.0.1:8080, exiting...

Part of the problem is that these are not consistent at all.  The errors vary in type 
and how long it takes to 
produce them.  I've gone over my code with a fine tooth comb....using strict, and 
watching for the infamous 
subroutine closure problems....and can't find any issues in the scripts themselves. 
They run fine, without 
any warnings under normal CGI (non mp) mode.  A test case is attached below....all it 
does is read a jpg 
image and return it.

It almost seems like something is walking over memory....and it's timing based.

Are there any known problems with mp2 that might cause this kind of behaviour?

I'm running Apache 2.0.43 with mod_perl 1.99_08 (the latest 2.0 version I 
believe) with ActivePerl 5.6.1 on a Win2K SP2 server installation.

Thanks!


.....Andrzej

-----test script ----------


use strict;
use CGI;
use CGI::Carp qw( fatalsToBrowser );
use FileHandle;

use constant BUFFER_SIZE => 16384;

my $query = new CGI;

#
#       Process the request
#

outputImageFile( $query->param( 'rownum' ), $query->param( 'size' ), $query->param( 
'extra' ) );

sub outputImageFile {
        my ( $itemNum, $size, $extra ) = @_;
        my $buffer;
        my $imageFile   = new FileHandle;
        
        my $path = "<" . "d:/program files/apache/cgi-bin/lifeitself/database/p" . 
$itemNum . "_" . $size;
        
        if( $extra ) {
                if( $extra =~ /^([\d]+)$/ ) {
                        $path .= $extra;
                }
        }
        
        $path.= ".jpg";
        
        if( $itemNum =~ /^([\d]+)$/ ) { 
                if( open( $imageFile, $path  ) ) {
                        print $query->header( -type => "image/jpeg" );
                        
                        binmode STDOUT;
                        binmode $imageFile;
                        
                        while( read( $imageFile, $buffer, BUFFER_SIZE ) ) {
                                print $buffer;
                        }
                        
                        close $imageFile;
                }
        }
}
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com

Reply via email to