Re: Connection pooling in mod_perl
[prev]
[thread]
[next]
[Date index for 2004/11/22]
On Mon, Nov 22, 2004 at 01:53:45PM -0500, Perrin Harkins wrote:
> On Mon, 2004-11-22 at 13:45, Alexander Christian Westholm wrote:
> > I'm writing a Mason based application that uses CDBI to talk to MySQL.
> > The app uses ithreads to perform several tasks in parallel, and uses
> > Apache::DBI for connection pooling.
>
> I think you mean persistent connections here. Apache::DBI does not
> offer any kind of pooling. That's why, theoretically, it should be safe
> if the DBD driver is thread-safe. Have you checked DBD::mysql and the
> MySQL client libraries for information about thread-safety?
>
> You may also be having problems with opening a connection and trying to
> use it in multiple threads at once, which won't work. I thought DBI
> would catch this though.
It does. But it can't protect against non thread-safe coding of either
drivers or database client libraries.
Tim.