develooper Front page | perl.dbi.users | Postings from May 2012

Creating new database handles with mod_perl

Thread Next
From:
Schultz, Len
Date:
May 19, 2012 17:07
Subject:
Creating new database handles with mod_perl
Message ID:
17DAA2C6FFFE6A4CA8AAA672C9D976D8064F31AA@mse1be2.mse1.mailstreet.com
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?

 

--len

 



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About