Pierre Smolarek wrote:
> Perrin Harkins wrote:
> 
>> There is a debug setting described in the Apache::DBI documentation
>> which will tell you this.
>>
>> - Perrin
>>
> 
> I've attached about 2 seconds of debug output. From what i can gather,
> its constantly creating new connections on what appears to be the same
> database per PID.
> 
> for example:
> 91571 Apache::DBI             new connect to
> 'database=ssAccess;host=server3.serverspy.netserverspyserverspyAutoCommit=1PrintError=0Username=serverspymx_connect_mode=ignore_errorsmx_dsns=ARRAY(0xa56e918)mx_error_proc=CODE(0xa3c0d60)mx_exit_mode=first_successmx_master_id=dbserver1'
> 
> 
> Then later on:
> 
> 91571 Apache::DBI             new connect to
> 'database=ssAccess;host=server3.serverspy.netserverspyserverspyAutoCommit=1PrintError=0Username=serverspymx_connect_mode=ignore_errorsmx_dsns=ARRAY(0xa573128)mx_error_proc=CODE(0xa3c0d60)mx_exit_mode=first_successmx_master_id=dbserver1'
> 
> 
> The only difference i see is mx_dsns=ARRAY(0xa56e918). So my layman
> guess is that the arrayref of db servers set within the DBD::Multiplex
> dsn is at a different address each time and therefore the cache sees a
> unique dsn? (Please correct me :) i'm far form an expert on these things).

Yup, that's exactly what is hapenning. Apache::DBI needs to know wether to
dsn's are identical, and this ever changing mx_dsns=ARRAY(0xa56e918) argument
is causing it to believe it's being asked about a new dsn each time.

2 possible avenues to investigate:
 - Change your code to not use an array-ref as mx_dsns argument but some string 
(comma delimited, etc)
 - Look at changing Apache::DBI to not use the ref as part of the dsn cache 
key, but use the contents of the array
   something along the lines of :
    $Key = Dumper([EMAIL PROTECTED]);

--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to