ID:               29902
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jwoodrich at avaya dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Solaris 7
 PHP Version:      5.0.1
 New Comment:

OCI8 module doesn't close connections and leaves this duty to the
Oracle server. That was done intentionally long time ago and that's how
it works. Currently all OCI8 connections are persistent (except those
established with oci_new_connect()/ocinlogon()), i.e. most often you
will have one OCI8 connection for each Apache child. You should tune
your Oracle to be able to close connections after a timeout.
Look here http://php.net/oci_close for additional info.


Previous Comments:
------------------------------------------------------------------------

[2004-08-30 20:54:50] jwoodrich at avaya dot com

Description:
------------
PHP's oci8 opens connections to the database server but does not
disconnect.  This appears to be done for each instance of apache that
uses PHP oci8.  Eventually the maximum number of sessions is reached on
the database server and no more connections can be made.  This has
occured on three different Solaris servers (two v7 and one v8) running
PHP 5.0.1.  After downgrading to PHP 4.3.8 the problem disappeared and
connections disappeared from session listing in Oracle as web
transactions completed.

Config line:
./configure --with-apxs --with-oci8 \
            --enable-ftp --with-curl --with-informix \
            --with-imap \
            --with-ldap --with-gd --with-jpeg- \
            --with-pgsql \
            --with-libxml-dir \
            --prefix \
            --with-png-dir --with-zlib --enable-pcntl --disable-debug

Oracle Server version: 8.1.7.2
Oracle Client version: 8.1.7



Reproduce code:
---------------
Example:
$dbh=ocilogon("LOGIN","PASSWORD","DATABASE");
$sth=ociparse($dbh,"select sysdate from dual");
ociexecute($sth);
ocifetchinto($sth,&$svret,OCI_ASSOC+OCI_RETURN_NULLS);
ocifreestatement($sth);
oci_close($dbh);
var_dump($svret);


Expected result:
----------------
array(1) { ["SYSDATE"]=>string(11) "<<the time>>" }

Actual result:
--------------
Once the maximum number of sessions is reached this error message is
returned: ORA-00604: error occurred at recursive SQL level 1 ORA-00018:
maximum number of sessions exceeded 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29902&edit=1

Reply via email to