[Catalyst] Database connections leaking

Kevin Nathan knathan at linux54.com
Mon Dec 31 23:39:39 GMT 2007


On Mon, 24 Dec 2007 18:22:13 +0000
Matt S Trout <dbix-class at trout.me.uk> wrote:

> You might want to see about ripping out the C::M::DBI connection
> management and using a DBIx::Class::Storage::DBI object instead - the
> Model::DBI code originates from a copy of the DBIx::Class code but
> I'm unaware of whether bugfixes and refactorings have been propagated
> to it.

That's basically what I ended up doing. I didn't like having two files
that each had a db connection setup; since all of our tables are
DBIx::Class, I got rid of the C::M::DBI and did some more searching on
my problem (wanting to do straight SQL from legacy code). 

Found exactly what I needed in an excerpt from Jonathan Rockway's new
book (my copy has been on order for almost a week now and can't wait to
get it!) For those of you interested in this solution, see:

   http://www.packtpub.com/article/catalyst-web-framework-building-your-own-model

and the section titled 'Extending a DBIx::Class Model'. It took a few
days to modify all the legacy code and get it running, but it's nice
having it a bit 'cleaner'. Unfortunately, still have db connection
leaking so the sysadmin is checking the Apache/mod_perl side (this is
beyond me at this point).

I would like to thank everyone for their help and suggestions -- I
would have stumbled a lot longer without your help. :-)


-- 
Xelia Wizard Systems Inc
Kevin Nathan
1220 S. Park Lane Ste. 3
Tempe, AZ 85281
(480) 516-0710
info at azxws.com
knathan at azxws.com

NOTICE:  This e-mail may contain confidential and privileged material
for the sole use of the intended recipient. Any review or distribution
by others is strictly prohibited. If you are not the intended recipient,
please contact the sender and delete and destroy all copies.



More information about the Catalyst mailing list