[CDBI] Re: odd swapping database issue on vhost / mason install

Perrin Harkins pharkins at gmail.com
Tue Apr 3 04:41:59 BST 2007


On 4/2/07, Edward J. Sabol <sabol at alderaan.gsfc.nasa.gov> wrote:
> I think you'll still have problems. You still have two different modules with
> the same name loaded into the same mod_perl server, right? That's a recipe
> for disaster, I think.

There are ways to deal with it, but the only one I recommend is what
you suggested: run separate backend servers.  In my case, we do have
separate vhosts and override db_Main to pick the right connection for
each one.  This is more trouble than most people will want to go to
though.

> I'm a little concerned about your use of set_up_table(). Not sure if it's
> related to the problem you are experiencing or not, but I know it can cause
> problems.

It works fine, as far as it goes.  The danger is in opening a
connection before apache forks and keeping it open.  If you use the
Ima::DBI patch I posted or the mod_perl advice on the wiki, you
shouldn't have trouble with it.

- Perrin



More information about the ClassDBI mailing list