php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15390 Persistent OCI8 Connections Get Poisoned
Submitted: 2002-02-05 12:59 UTC Modified: 2005-09-08 17:27 UTC
Votes:15
Avg. Score:4.5 ± 0.8
Reproduced:15 of 15 (100.0%)
Same Version:5 (33.3%)
Same OS:4 (26.7%)
From: hz11 at nyu dot edu Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.3.2 OS: RedHat 7.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hz11 at nyu dot edu
New email:
PHP Version: OS:

 

 [2002-02-05 12:59 UTC] hz11 at nyu dot edu
I have PHP 4.0.6 compiled as an Apache 1.3.20 module with OCI8 and MySQL on RedHat 6.2.  I use persistent connections with OCI8 to avoid the costly connection construction for Oracle for each request.  However, I notice that these persistent connections get "poisoned" under certain
circumstances.  What I mean by this is this:

Since each persistent connection stays with it's corresponding Apache process, if the database happens to be down when a request comes in, the persistent connection that is used throws an ORA-03113.  However, even when the database comes back, the persistent connection still thinks the database is down somehow, and will continue to throw the ORA-03113 error.  As a result, if a request happens to hit the poisoned Apache process, it appears the database is down.  If a request hits another Apache process, all is OK.

So far, the only way I've seen to deal this is to restart Apache, and have the persistent connections build up again.  Obviously, this is not a good thing, and if database connectivity is lost in any form, the persistent connections get poisoned again, and the cycle begins.

Now as this might not be a bug per se, I would think that persistent connections should at least check that they aren't corrupted in some way; or 'freshen' themselves.  Although I haven't tested it fully, I have never seen this behavior with persistent MySQL connections.

Please contact me for any further details or clarification if needed.

Thank you,

Hans

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-13 09:22 UTC] thies@php.net
hack:
change your tnsnames.ora to include a failover to the same db.
PROD=(
    DESCRIPTION=(
        ADDRESS=(PROTOCOL=TCP)(Host=127.0.0.1)(Port=1521))
        (CONNECT_DATA=(SID=PROD)(failover_mode=(backup=PROD)(type=session)(method=basic)(retry=100)(delay=60)))
)

this will make the Net8 client to reconnect automagically

 [2002-11-04 08:26 UTC] hz11 at nyu dot edu
Just to note, the same behavior occurs with PHP 4.2.3 on RH 7.3.  The hack seems to handle this without much visibility to the end-user, but is there a real fix planned for this?

Best,

Hans
 [2003-06-02 16:45 UTC] jason@php.net
FYI, This is happening to some of our applications with php 4.3.2 on Solaris 8

-Jason
 [2003-08-20 23:57 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2005-09-08 17:27 UTC] tony2001@php.net
The bug has been fixed in OCI8 v.1.1, which is available in CVS HEAD and PECL (use `pear install oci8-beta` to install it).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 18:01:31 2024 UTC