Re: Connection pooling in mod_perl

[prev] [thread] [next] [Date index for 2004/11/22]

From: Perrin Harkins
Subject: Re: Connection pooling in mod_perl
Date: 18:53 on 22 Nov 2004
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

Connection pooling in mod_perl
Alexander Christian Westholm 18:45 on 22 Nov 2004

Re: Connection pooling in mod_perl
Perrin Harkins 18:53 on 22 Nov 2004

Re: Connection pooling in mod_perl
Tim Bunce 20:41 on 22 Nov 2004

Generated at 17:24 on 02 Dec 2004 by mariachi v0.52