php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53962 Persistent connections
Submitted: 2011-02-08 18:55 UTC Modified: 2011-02-08 19:46 UTC
From: tiago dot duarte at softconcept dot pt Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.3.5 OS: Windows 7
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: tiago dot duarte at softconcept dot pt
New email:
PHP Version: OS:

 

 [2011-02-08 18:55 UTC] tiago dot duarte at softconcept dot pt
Description:
------------
I would aspect to see TCP connection between the apache and the Oracle server to die, after 10seconds the script ends. What i see, is that the connections stays ESTABLISHED until i restart apache.

//php.ini changes
oci8.max_persistent = 2

oci8.persistent_timeout = 10

oci8.ping_interval = -1

Test script:
---------------
  $sql = "SELECT nome FROM f_pessoa";
  $conn = oci_pconnect($user_oracle, $password_db_oracle, $database_oracle);
  $stid = oci_parse($conn, $sql);
  $r = oci_execute($stid, OCI_DEFAULT);
  if (!$r) {
    $e = oci_error($stid);
    echo htmlentities($e['message']);
    exit;
  }
  while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
    foreach ($row as $item) {
	$table_2 .= ($item?htmlentities($item):' ');
    }
  }
  oci_close($conn);
  oci_free_statement($stid);


Expected result:
----------------
I would expect that TCP connections will die 10s after the script ends.

Actual result:
--------------
The TCP connection between the apache and the Oracle Server stays ESTABLISHED for ever...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-08 19:32 UTC] johannes@php.net
-Status: Open +Status: Bogus
 [2011-02-08 19:32 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Mind the notes on http://php.net/oci8.persistent-timeout
 [2011-02-08 19:46 UTC] tiago dot duarte at softconcept dot pt
What do you recomend is to upgrade to oracle 11, using Database Resident Connection Pooling?
I do not understand how this is not a bug, because the TCP between apache and oracle remains ESTABLISHED.
Is there any way to resolve my problem?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC