[Dbix-class] Apache::DBI and DBIx::Class

Brandon Black blblack at gmail.com
Wed Apr 5 16:03:29 CEST 2006


On 4/5/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> Brandon Black wrote:
> > Also, because Apache::DBI's connection caching never checks to see if
> > the process and/or thread id changed, it will give you an invalid $dbh
> > from a previous process/thread if you use a connection, then
> > thread/fork, then try to re-connect to the same source, which is a Bad
> > Thing.
>
> Could we store a hash of weakrefs of the $dbh's we've seen under a given
> pid/tid somehow and handle it that way?
>
> I think the problem is that they're ending up with double the number of
> expected connections - 1 from Apache::DBI and 1 from DBIC.
>

If the current code is working correctly that shouldn't be happening,
and it didn't happen in testing against prefork mod_perl +
Apache::DBI.  I'll try and do some more testing today and see if I've
missed something.

-- Brandon



More information about the Dbix-class mailing list