perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <phark...@gmail.com>
Subject Re: Apache::DBI connect
Date Thu, 07 Nov 2013 16:00:19 GMT
On Thu, Nov 7, 2013 at 9:46 AM, Xinhuan Zheng <xzheng@christianbook.com>
wrote:
>The $ok is undef. In the case if the test does succeed (like the first
select), $ok returns 0E0.

That all sounds good.  0E0 is a true value in Perl.  It means "zero but
true."  And undef is a false value.  You don't need to test for undef.

> Since I changed DBD::Oracle subroutine ping to use 'select 1 from dual',

I don't actually understand why you did that.  What was wrong with the
normal ping?

In any case, there's no need to change the Apache::DBI code, even with your
"select 1 from dual" test.  It returns a true value (0E0) if it succeeds
and a false value (undef) if it fails.

Did your script succeed in reconnecting after it lost the connection?

> I have another request. The Apache::DBI cached a dead database handle for
apache version 1.3.42 if startup.pl create a database handle. The apache
child processes inherits this dead handle. It doesn't cause application
error but it does take memory space. If there is many apache processes,
that's not good. Can you please identify and change the code for this
problem?

Yes, I haven't forgotten about that, but I haven't had time to work on it
yet.  You can try fixing it yourself by looking at the code in Apache::DBI
that checks if the server is starting under apache 1.x.  Otherwise, I will
eventually get to it.

- Perrin

Mime
View raw message