php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26829 Killed Oracle Sessions openned with OCIPLogon()
Submitted: 2004-01-07 11:36 UTC Modified: 2005-09-08 11:50 UTC
Votes:10
Avg. Score:4.7 ± 0.5
Reproduced:8 of 8 (100.0%)
Same Version:1 (12.5%)
Same OS:0 (0.0%)
From: david dot gaia dot kano at dartmouth dot edu Assigned: tony2001 (profile)
Status: Closed Package: OCI8 related
PHP Version: 4.3.4 OS: Compaq Unix
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: david dot gaia dot kano at dartmouth dot edu
New email:
PHP Version: OS:

 

 [2004-01-07 11:36 UTC] david dot gaia dot kano at dartmouth dot edu
Description:
------------
Here at Dartmouth our DBA team has a policy of killing any Oracle session that has been connected for longer than 24 hours. Hence the persistant connections created by the PHP OCIPLogon() call get killed once a day. We don't really want to restart our apache server once a day, so it would be great if OCIPLogon() would check to see that a previously created persistant connection is still good somehow and if not, create a new connection.

I noticed quite a few bugs along these lines, but they have all been closed. I don't know if that is because this bug was fixed or because the submitters have continued to restart their servers after every database restart or killed connection.

If this is not going to be fixed, I guess we would have to write our own application level code to check the connections from ociplogon() and if it is bad, use OCILogon() instead for that request and issue a apache_child_terminate() call so that eventually all the children with bad oracle sessions would be restarted...

Reproduce code:
---------------
$con = OCIPLogon("user", "password", "tns_db_name");
// at this point all looks good still... $con != false
// but if this session was killed then any use of $con 
// results in one error or another.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-07 20:14 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

AFAICT, the function does check if persistent connection is still alive (using oci_ping())..but did you mean the connection is killed while the script is being run or what?

 [2004-01-19 14:12 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.


 [2004-02-04 04:01 UTC] tony2001@php.net
This is known issue and should be fixed in future releases of PHP5.

 [2004-02-13 09:55 UTC] david dot gaia dot kano at dartmouth dot edu
Sorry for the delayed respose, sniper. We have been working around this Ok and I'm finally getting back to checking this bug status.

To clarify, the issue is that our Oracle Administrators have proceedures that automatically kill any session that has been running for longer than 24 hours. So no, it is not an issue of the connection being killed while the script is running.

I think we can wait for php 5 to address this, rather than building a "latest" php 4 release from CVS. I'm hoping that will be available fairly soon anyway because I'm excited about the new features! If it is not released soon, I'll probably build it on my test server and then check this bug out there to confirm it is fixed.
 [2005-05-18 09:30 UTC] pawel at gmx dot net
I'm using PHP 5.03 and the problem still exists: PHP still tries to use killed connections and then fails to connect to Oracle. Are there any plans to fix this bug in the nearest future. Is there any workaround for the time being?
 [2005-05-18 10:45 UTC] tony2001@php.net
See bug #29779.
 [2005-09-08 11:50 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: Sun Nov 24 23:01:32 2024 UTC