Darren, Thanks for the suggestion. I tried that today and noticed the same behavior. This is not surprising as both are using DBI internally to get the connection. All httpd processes point to the same DBH after connection. Should they or should each process have a unique address returned by DBI->connect or DBIx::Connector->connect?
--len On May 19, 2012, at 5:53 PM, "Darren Duncan" <dar...@darrenduncan.net> wrote: > Instead of using Apache::DBI directly, I recommend using the CPAN module > http://search.cpan.org/dist/DBIx-Connector/ instead, which is focused on > handling your use case effectively. -- Darren Duncan > > Schultz, Len wrote: >> I've run into an issue when stress testing mod_perl that the database >> connections are going away. I suspect that processes are sharing >> database connections, causing the issue. >> But I've followed all instructions for Apache::DBI, and can't figure >> this out. >> I'm making the connections in the child process and not in startup.pl. >> But when I examine the $dbh returned by each child from the >> DBI->connnect, the address is the same for every httpd process. Firstly, >> if this is working properly and reconnecting for each process, should >> the address returned by DBI->connect be different for each child >> process? I've assumed so, but as far as I can tell the core C code in >> DBI (dbih_setup_handle) is managing this and is returning the same >> address. So maybe I'm not understanding what it means to reconnect in >> the child. >> Am I reconnecting properly if the $dbh handles are the same?