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

 ID:                 51610
 Updated by:         s...@php.net
 Reported by:        marioroy at verizon dot net
 Summary:            1 second+ needed for OCI8 versus PDO/oci to
                     open/close connection and exit
 Status:             Closed
 Type:               Bug
 Package:            OCI8 related
 Operating System:   Linux & Snow Leopard
 PHP Version:        5.3SVN-2010-04-20 (snap)
 Assigned To:        sixd
 Block user comment: N

 New Comment:

The fix for Oracle bug 9891199 is included in Oracle libraries from
11.2.0.2 

onwards.


Previous Comments:
------------------------------------------------------------------------
[2010-08-07 02:28:34] s...@php.net

The increase in exit cleanup time occurs when OCI8 1.3+ uses Oracle
10.2.0.4+ client libraries.



There is a resolution in OCI8 1.4.3.  An Oracle client library fix
(Oracle bug 9891199) is also needed for this patch to have an effect.



OCI8 1.4.3 will be included in the PHP release _after_ PHP 5.3.3.

------------------------------------------------------------------------
[2010-08-07 02:24:28] s...@php.net

Automatic comment from SVN on behalf of sixd
Revision: http://svn.php.net/viewvc/?view=revision&revision=301960
Log: Fixed bug #51610 (Using oci_connect causes PHP to take a long time
to exit). Do PECL OCI8 1.4.3 release

------------------------------------------------------------------------
[2010-07-08 07:37:56] s...@php.net

I wonder what issues the following patch would bring?





Index: oci8.c

===================================================================

--- oci8.c    (revision 300858)

+++ oci8.c    (working copy)

@@ -35,6 +35,7 @@

 #include "php.h"

 #include "ext/standard/info.h"

 #include "php_ini.h"

+#include "SAPI.h"

 #include "ext/standard/php_smart_str.h"



 #if HAVE_OCI8

@@ -3187,7 +3188,11 @@

         PHP_OCI_CALL(OCIHandleFree, ((dvoid *) session_pool->err, 

OCI_HTYPE_ERROR));

     }



-    if (session_pool->env) {

+    /* When PHP is invoked as a CLI then destruction of the

+     * Environment handle is left to the OS at PHP process shutdown.

+     */

+    if (session_pool->env && !sapi_module.phpinfo_as_text) {

         PHP_OCI_CALL(OCIHandleFree, ((dvoid *) session_pool->env, 

OCI_HTYPE_ENV));

     }

------------------------------------------------------------------------
[2010-06-26 05:44:43] marioroy at verizon dot net

I have applied this patch to oci8.c.  It resolves the issue for me.  I
set 

use_spool to 0.  Can we have use_spool enabled/disabled via an oci8.ini


directive.  Thanks.



@@ -1711,7 +1693,7 @@

        smart_str hashed_details = {0};

        time_t timestamp;

        php_oci_spool *session_pool = NULL;

-       zend_bool use_spool = 1;           /* Default is to use
client-side 

session pool */

+       zend_bool use_spool = 0;           /* Default is to use
client-side 

session pool */

        zend_bool ping_done = 0;

------------------------------------------------------------------------
[2010-06-18 04:19:45] s...@php.net

The PHP OCI8 code changes in question have been in production for two

years.  They were introduced to support Database Resident Connection

Pooling and FAN for scalability in web apps.  The dominant use cases

for SQL*Plus and PHP are very different.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51610


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

Reply via email to