#47908 [Bgs]: problem with error error: Allowed memory size of 134217728 bytes exhausted
| From: | sixd@php.net | Date: | Wed, 20 Jan 2010 19:18:38 +0000 |
| Subject: | #47908 [Bgs]: problem with error error: Allowed memory size of 134217728 bytes exhausted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146826@lists.php.net to get a copy of this message | ||
ID: 47908
Updated by: sixd@php.net
Reported By: kiet dot tran at enscm dot fr
Status: Bogus
Bug Type: OCI8 related
Operating System: linux Redhat ES 4.7
PHP Version: 5.2.9
New Comment:
Also see http://bugs.php.net/bug.php?id=50789
Previous Comments:
------------------------------------------------------------------------
[2009-04-07 20:33:10] sixd@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
----------------
Your observation is likely due to PHP 5 tracking memory better. The
migration doc http://www.php.net/manual/cs/migration52.other.php
says
'Thanks to this new-found accuracy memory usage may appear to have
increased, although actually it has not.'
Or perhaps the new memory manager chunking and other changes to OCI8
plays a role. Calculate how much data you need to hold after fetching to
see what expectation you should have.
With large data sizes, fetching LOBs as locators (i.e. remove
OCI_RETURN_LOBS) and operating on them one by one might reduce peak
memory, depending on your output requirements.
------------------------------------------------------------------------
[2009-04-06 13:23:27] kiet dot tran at enscm dot fr
Description:
------------
I have this function which runs well on Php 4.9 :
function lire_structure($inlist_stru,$link) {
if ($inlist_stru=='') return '';
$stmt = OCIParse($link,"select STRU_ID,STRU_MOLFILE from
sub_structure_view where stru_id in(".$inlist_stru.")");
OCIExecute($stmt);
while (OCIFetchInto ($stmt, $row, OCI_RETURN_LOBS)) {
$i++;
$tabstru[$row[0]]=$row[1];
//echo "$i<br>";
}
return $tabstru;
}
But when I used it on php 5.2.9 :
I have this following error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 524288 bytes)
So I change the memory limit of php.ini from 128 M to 512 (256 m is not
enough) and the function works well.
But I'm asking why with php 4.9 where the memory limit of php.ini is
only at 8 M, the function works well?
I see in internet forum that php 5 releases memory no correctly.
Could you help me?
Actual result:
--------------
I have this following error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 524288 bytes)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47908&edit=1