lschult2 has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating new database handles with mod_perl
by Anonymous Monk on May 20, 2012 at 00:36 UTC | |
by Anonymous Monk on May 20, 2012 at 04:06 UTC | |
by Anonymous Monk on May 20, 2012 at 14:25 UTC | |
by lschult2 (Novice) on May 20, 2012 at 14:34 UTC | |
by Anonymous Monk on May 22, 2012 at 09:14 UTC | |
|
Re: Creating new database handles with mod_perl
by locked_user sundialsvc4 (Abbot) on May 20, 2012 at 22:46 UTC | |
by lschult2 (Novice) on May 21, 2012 at 14:30 UTC |