Apache::DBI connect

2013-11-06 Thread Xinhuan Zheng
Hi, I am using Apache+mod_perl and Apache::DBI with Oracle connection pooling feature. I noticed a problem with subroutine connect. Below code checks database connection: 200:if ($Connected{$Idx} and (!$needping or eval{$Connected{$Idx}->ping})) { debug(2, "$prefix already connecte

Re: Apache::DBI connect

2013-11-06 Thread Perrin Harkins
On Wed, Nov 6, 2013 at 4:07 PM, Xinhuan Zheng wrote: > I wonder this line of code should be changed to 'DBI->connect(@args) if > ($@)'. If ping failed, that means the connection is already closed, $drh > may be no longer valid, will $drh->connect always return a valid new > connection? What's the

Re: Apache::DBI connect

2013-11-06 Thread Xinhuan Zheng
Hi Perrin, I am using Oracle Resident Connection Pool feature. The application randomly got "ORA-03114 not connect to oracle database" error. As per this document: http://search.cpan.org/~phred/Apache-DBI-1.12/lib/Apache/DBI.pm I have changed the DBD::Oracle to use the following ping instead of