Re: Connection pooling in mod_perl
[prev]
[thread]
[next]
[Date index for 2004/11/22]
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.
Incidentally, if you are using MyISAM tables that don't support
transactions, you could just drop Apache::DBI and use
DBI->connect_cached().
- Perrin
 |
 |
Re: Connection pooling in mod_perl
Perrin Harkins 18:53 on 22 Nov 2004
|