|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58014 Leaking memory when I use import
Submitted: 2008-01-21 10:49 UTC Modified: 2008-01-23 04:18 UTC
From: soid dot exe at hotmail dot com Assigned:
Status: Closed Package: oci8 (PECL)
PHP Version: 5.2.5 OS: Debian Linux 2.6.18-openvz-686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: soid dot exe at hotmail dot com
New email:
PHP Version: OS:


 [2008-01-21 10:49 UTC] soid dot exe at hotmail dot com
I have a problem when I use the INSERT operation like that.

It seems this is leaking memory.
So I try to import a big file using the INSERTs and I have a memory overflow error.

Reproduce code:
print "PHP Stress Test!\n";

$conn = oci_connect('scott', 'tiger', 'xxxxx');

for ($i = 1; $i < 1000; $i++) {
if ($i % 100 == 0) print "#$i: " . memory_get_usage() . "\n";

$s = oci_parse($conn, "INSERT INTO TBL VALUES ($i, $i)");


Expected result:
#100: 51196
#200: 59196
#300: 67196
#400: 75196
#500: 83196
#600: 89520
#700: 89772
#800: 90044
#900: 90296

First column is count of INSERTs, second's a memory use.
So it seems that's leaking memory.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-21 11:05 UTC] tony at daylessday dot org
Update PHP to the latest stable version and try again.
I believe what you see is Zend memory manager caching small memory blocks.
 [2008-01-23 04:18 UTC] soid dot exe at hotmail dot com
Thank a lot! I upgraded our PHP to version 5.2.5 and that works fine!
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 20 15:03:37 2023 UTC