Bug #12518 Updated: ocifreestatment doesn't free the Oracle cursor and so you run out of cursors
| From: | derek at innovyx dot com | Date: | Mon, 06 Aug 2001 17:23:13 +0000 |
| Subject: | Bug #12518 Updated: ocifreestatment doesn't free the Oracle cursor and so you run out of cursors | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-62324@lists.php.net to get a copy of this message | ||
ID: 12518
User updated by: derek@innovyx.com
Reported By: derek@innovyx.com
Old Status: Open
Status: Closed
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 4.0.6
New Comment:
With the help of v$open_cursor I've tracked down the problem and it was a case of user error,
my apologies for having taken up your time.
Previous Comments:
------------------------------------------------------------------------
[2001-08-06 12:59:04] derek@innovyx.com
I have a long-running PHP script that eventually comes up with:
Failed execution, error: ORA-00604: error occurred at recursive SQL level 2 ORA-01000: maximum open
cursors exceeded.
I don't explicitly use any cursors in this script btw. In addition I found (via a web search)
that someone else has been experiencing the same thing.
However, in response to your request I've been trying to build a test script to leak cursors
and reproduce the problem, unfortunately, thus far, even deliberately leaking cursors is not
producing it. :(
------------------------------------------------------------------------
[2001-08-01 16:18:03] thies@php.net
what makes you belive it doesn't work?
please send me a short testcase that shows leakage of
resources.
------------------------------------------------------------------------
[2001-08-01 13:20:01] derek@innovyx.com
the ocifreestatment function doesn't actually free the Oracle cursor, these are only freed when
the script exits.
While this isn't a problem when using PHP as a web page it is a problem if you have a command
line script that has to perform thousands (or tens of thousands) of queries eventually the
open_cursors limit is exceeded and all further queries fail.
The same appears to be true with connections.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12518&edit=1