Class::DBI::Factory and Apache::DBI don't play nice

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

From: Alexander =?iso-8859-1?Q?Gr=E4fe?=
Subject: Class::DBI::Factory and Apache::DBI don't play nice
Date: 21:34 on 19 Nov 2004
Hi all.

After repeatedly trying to have dynamic database connections, so I could
reuse my perl code for several websites without code duplication, I
found Class::DBI::Factory, which solved the problem extremely well.

But I ran into one snag:

While testing CDF, I had Apache::DBI commented out of the startup.pl.
I have two vhosts that share the same class hierachy, just two different
db_names in the configuration file.

Worked like a charm, until I added Apache::DBI back to the startup.pl
and load-tested the vhosts.

After one run of the ab benchmark, 100 requests, 10 concurrent, both
vhosts suddenly use the same tables as the benchmarked site.

If I restart the server and run the benchmark on the other vhost first, both
vhosts now use that vhosts db connection.

If I restart the server and alternate loading the vhosts, everything
works. But as soon as I start the benchmark, something breaks.

Is this a known problem with Apache::DBI or Class::DBI::Factory, or am I
doing something incredibly stupid?

Regards,
	Alexander Gräfe

(message missing)

Class::DBI::Factory and Apache::DBI don't play nice
Alexander =?iso-8859-1?Q?Gr=E4fe?= 21:34 on 19 Nov 2004

Re: Class::DBI::Factory and Apache::DBI don't play nice
Alexander =?iso-8859-1?Q?Gr=E4fe?= 22:35 on 19 Nov 2004

Re: Class::DBI::Factory and Apache::DBI don't play nice
Alexander =?iso-8859-1?Q?Gr=E4fe?= 08:13 on 20 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52