Re: mp2 and Class:DBI
[prev]
[thread]
[next]
[Date index for 2005/01/05]
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