Re: mp2 and Class:DBI

[prev] [thread] [next] [Date index for 2005/01/05]

From: Mike Carlton
Subject: Re: mp2 and Class:DBI
Date: 05:42 on 05 Jan 2005
On Tue, 04 Jan 2005 15:47:50 -0500, Perrin Harkins <perrin@xxxx.xxx> wrote:
> On Tue, 2005-01-04 at 14:18 -0500, Sean T Allen wrote:
> > I looked to see and couldnt find any reports of issues with
> > using Class::DBI w/ mod-perl 2 but wanted to check here to
> > see if there are any I should be aware of...
> 
> Class::DBI currently breaks the transaction-safety feature of
> Apache::DBI.  This is not an issue if you are using MySQL without
> transactions.  See this message for more:
> http://mathforum.org/epigone/modperl/teuthocrix/1098821949.2903.49.camel@xxxxxxxxx.xxxxxxxxxxx
> 
> > Also, if anyone could give me a basic ballpark on how much
> > I could expect to see per process memory usage jump
> > by using Class::DBI, I'd appreciate it.
> 
> I can't give you a ballpark, but you should expect some jump.  The
> amount really depends on how you use it.  If you load large sets of data
> as Class::DBI objects, it will be significantly larger than doing the
> same thing with basic DBI results.  If you only work with small sets
> loaded at once, your main increase will just be form additional modules
> being loaded.  Load your Class::DBI stuff in startup.pl to minimize the
> unshared memory.
> 
> - Perrin
> 
> 

But isn't there a problem with making db connections from startup.pl? 
When the processes later fork, you potentially wind up with database
connection problems (I saw lots of problems under MP1 when I was doing
this).

Particularly with Class::DBI::mysql, just loading a class makes a
database connection.  Is there a safe way to make database connections
from startup.pl and not have it blow up?

--mike

mp2 and Class:DBI
Sean T Allen 19:18 on 04 Jan 2005

Re: mp2 and Class:DBI
Perrin Harkins 20:47 on 04 Jan 2005

Re: mp2 and Class:DBI
Mike Carlton 05:42 on 05 Jan 2005

Re: mp2 and Class:DBI
Stas Bekman 05:49 on 05 Jan 2005

Re: mp2 and Class:DBI
Randy Kobes 20:58 on 05 Jan 2005

Re: mp2 and Class:DBI
Perrin Harkins 21:13 on 05 Jan 2005

Re: mp2 and Class:DBI
Stas Bekman 21:13 on 05 Jan 2005

Re: mp2 and Class:DBI
Perrin Harkins 05:56 on 05 Jan 2005

Generated at 12:16 on 16 Jan 2005 by mariachi v0.52