From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      5CVS-2004-04-23 (dev)
PHP Bug Type:     Apache2 related
Bug description:  Memory is not freed with apache2handler SAPI

Description:
------------
PHP does not free the memory it's using during and after a request when
using apache2handler SAPI. apache2filter SAPI works fine.

The memory it's using is however reused, but if I would send 500MB data
and only have 256MB RAM, the OOM killer would start killing processes and
apache when there are no more processes to kill (depending on OOM killer
used).

Reproduce code:
---------------
<?php
$string = '';
for ($i = 0; $i < 1024; $i++)
   $string .= 'A';

for ($i = 0; $i < (1024 * 200); $i++) {
   echo $string;
   flush();
}
?>

Expected result:
----------------
Low memory usage

Actual result:
--------------
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8434 nobody    25   0  284m 238m  52m S  0.0 31.6   0:25.14 httpd


-- 
Edit bug report at http://bugs.php.net/?id=28113&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28113&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28113&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28113&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28113&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28113&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28113&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28113&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28113&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28113&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28113&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28113&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28113&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28113&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28113&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28113&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28113&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28113&r=float

Reply via email to