[Dbix-class] Apache::DBI and DBIx::Class
Matt S Trout
dbix-class at trout.me.uk
Wed Apr 5 16:21:51 CEST 2006
Brandon Black wrote:
> 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.
The user in question has other non-DBIC code in the same mod_perl.
That's the rub.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list