[CDBI] Script that crashes mod_perl

Eric Just e-just at northwestern.edu
Fri Oct 6 22:49:58 BST 2006


Does anyone have any insights as to why the following script crashes 
mod_perl after 2000 page requests?  It is, I imagine one of the simplest 
scripts you could write with Class::DBI.

I have set up an apache benchmark (ab) script to get this page multiple 
times and it seems to always crash after about 2000 requests.  A script 
that does the same thing with DBD::Oracle does not crash it, neither does 
one written with Ima::DBI.  I have tried various combinations of

$Class::DBI::Weaken_Is_Available = 0; #(in the class def for dicty::Testing)
$auto_cv->remove_from_object_index(); #(at the end of the script)
$auto_cv->clear_object_index();            #(at the end of the script)

None of those seemed to work.

I am using windows XP and Xampp and Class::DBI 3.0.6

here is the script:
--------------------------------------------------------------------------------------------------------------------------------------------------------
#!C:/web/xampp/perl/bin/perl.exe

package dicty::Testing;
use base qw( Class::DBI );

dicty::Testing->set_db('Main','dbi:Oracle:dictyBase', 'CGM_CHADO', 
'CGM_CHADO');

package dicty::CV;
use base 'dicty::Testing';
__PACKAGE__->table('cv');
__PACKAGE__->table_alias('cv');
dicty::CV->columns(All => qw/cv_id name/);

package main;

my ($auto_cv)           = dicty::CV->search( name => 'autocreated' );

print "Content-Type: text/html\n\n";
print $auto_cv->cv_id();



============================================

Eric Just
e-just at northwestern.edu
dictyBase Programmer
Center for Genetic Medicine
Northwestern University
http://dictybase.org

============================================ 





More information about the ClassDBI mailing list