, 2013 9:57 AM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Cc: Adam Prime mailto:adam.pr...@utoronto.ca>>,
"modperl@perl.apache.org<mailto:modperl@perl.apache.org>"
mailto:modperl@perl.apache.org>>
Subject: Re: Apache::DBI connect
On Fri, Nov
On Fri, Nov 8, 2013 at 2:58 PM, Xinhuan Zheng wrote:
> The query is from the application code not the 'select 1' test query.
>
OK, then it seems like Apache::DBI may not have a problem.
> While most of time I saw Apache::DBI->connect is called but sometime from
> a p
Hi Perrin,
The query is from the application code not the 'select 1' test query.
While most of time I saw Apache::DBI->connect is called but sometime from a
process, it will print out it finds a cached connection and ping is ok but
sometimes from the same process it didn
:DBI? Or something
else in your own code?
> We use Apache::DBI and DBI and use Apache::DBI is before DBI. We actually
> call DBI->connect_cached and based on DBI document, I guess this would be
> handled by Apache::DBI connect.
Yes, it should be.
> However, I guess we also defined a b
sometimes the
query would fail. We use Apache::DBI and DBI and use Apache::DBI is before DBI.
We actually call DBI->connect_cached and based on DBI document, I guess this
would be handled by Apache::DBI connect. However, I guess we also defined a
base class that can store a database handle. There
})) {
>
> What's the difference between the two? Why the code in favor of "or"
> instead of "and"?
>
> - xinhuan
>
> From: Perrin Harkins
> Date: Thursday, November 7, 2013 3:05 PM
>
> To: Xinhuan Zheng
> Cc: Adam Prime , "modperl@
m.pr...@utoronto.ca>>,
"modperl@perl.apache.org<mailto:modperl@perl.apache.org>"
mailto:modperl@perl.apache.org>>
Subject: Re: Apache::DBI connect
Sorry, I can't determine the problem from your log. You'll need to either run
it in the debugger or add some debuggi
: Xinhuan Zheng
> Cc: Adam Prime , "modperl@perl.apache.org" <
> modperl@perl.apache.org>
>
> Subject: Re: Apache::DBI connect
>
> It is in the DBI documentation. Search for "0E0".
>
> - Perrin
>
>
> On Thu, Nov 7, 2013 at 12:41 PM, Xinhuan Z
phark...@gmail.com>>
Date: Thursday, November 7, 2013 1:00 PM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Cc: Adam Prime mailto:adam.pr...@utoronto.ca>>,
"modperl@perl.apache.org<mailto:modperl@perl.apache.org>"
mailto:modperl@perl.apache.org>>
Subje
;On 13-11-07 11:29 AM, Xinhuan Zheng wrote:
> >> one correct - In both cases, the return value is evaluated to false.
> >>
> >> How do you distinguish?
> >>
> >> - xinhuan
> >>
> >> From: Xinhuan Zheng >> <mailto:xzh...@christ
t;> From: Xinhuan Zheng > <mailto:xzh...@christianbook.com>>
>> Date: Thursday, November 7, 2013 11:12 AM
>> To: Perrin Harkins mailto:phark...@gmail.com>>
>> Cc: mod_perl list ><mailto:modperl@perl.apache.org>>
>> Subject: Re: Apache::DB
return value is evaluated to false.
How do you distinguish?
- xinhuan
From: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Date: Thursday, November 7, 2013 11:12 AM
To: Perrin Harkins mailto:phark...@gmail.com>>
Cc: mod_perl list mailto:modperl@perl.apache.org>>
Subject:
l.apache.org>>
Subject: Re: Apache::DBI connect
> I don't actually understand why you did that. What was wrong with the normal
> ping?
With Oracle DRCP, even though ping succeeds, the connection to the server
process is actually terminated. Or ora_ping() may return 0E0 "
don't understand that piece of code. I can't do the change. Hope you can help.
- xinhuan
From: Perrin Harkins mailto:phark...@gmail.com>>
Date: Thursday, November 7, 2013 11:00 AM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Cc: mod_perl list mailto:modperl@perl.apac
On Thu, Nov 7, 2013 at 9:46 AM, Xinhuan Zheng
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.
>
Apache::DBI already connected to ''
3861 Apache::DBI disconnect (overloaded)
[Wed Nov 6 16:49:50 2013] [crit] ORA-03114: not connected to ORACLE (DBD
ERROR: OCIStmtExecute).
Process 3861 establishes a new connection. and it says "already connected to"
database. While the query execution failed with "ORA-03114" and the httpd
process is in CLOSE_WAIT state. How does it thinks it's alre
(DBD ERROR: OCIStmtExecute).
>
> Process 3861 establishes a new connection. and it says "already
> connected to" database. While the query execution failed with "ORA-03114"
> and the httpd process is in CLOSE_WAIT state. How does it thinks it's
> already connected while it's actually not?
>
>
>- xinhuan
>
>
>
-
From: Perrin Harkins mailto:phark...@gmail.com>>
Date: Wednesday, November 6, 2013 5:54 PM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Cc: mod_perl list mailto:modperl@perl.apache.org>>
Subject: Re: Apache::DBI connect
On Wed, Nov 6, 2013 at
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
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
20 matches
Mail list logo