php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28177 Apache Memory leak
Submitted: 2004-04-27 08:42 UTC Modified: 2004-06-13 14:55 UTC
Votes:9
Avg. Score:5.0 ± 0.0
Reproduced:8 of 8 (100.0%)
Same Version:7 (87.5%)
Same OS:5 (62.5%)
From: prof_moriarty at veryfast dot biz Assigned:
Status: Closed Package: Apache related
PHP Version: 5.0.0RC2 OS: win xp
Private report: No CVE-ID: None
 [2004-04-27 08:42 UTC] prof_moriarty at veryfast dot biz
Description:
------------
I have php 5RC2 (oh, someone's added rc2 to the list now :) ), running with apache 2.0.49 as a sapi module (whichever one is not a CGI. the manaul is far from clear on what it's called!).
Also, mysql (4.0.18).

I have been running apache on my dev machine for a few hours, running php scripts occasionally to test my code.
Apache is presently using 100MB of RAM.
there are two apache functions running. the initial one that runs from this command: "H:\webdev2\Apache2\bin\Apache.exe" -w -f "H:\webdev2\Apache2\conf\httpd.conf" -d "H:\webdev2\Apache2\."

and the child process to that:
H:\webdev2\Apache2\bin\Apache.exe -d H:/webdev2/Apache2 -f H:\webdev2\Apache2\conf\httpd.conf -d H:\webdev2\Apache2\.


The parent is using just 6mb ram.
The child is using 103mb. The child is using 13mb when initialised.

Every time i run a script, the number goes up by a few K. occasionally it doesn't go up, but usually it does. This is for different php scripts that work fine under other configs.
I'd conclude a memory leak, but you folks are the experts. :)
Need more info, just ask.


p.s. I know apache 2 support is experimental. that's why i'm testing it. :)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-16 20:33 UTC] prof_moriarty at veryfast dot biz
Ah.
I am now running PHP5RC2 as a module within apache 1.3.x.
And it is STILL not releasing RAM when it is done with it. Noting that support for apache 1 is _not_ experimental!
Indeed it says this in the install.txt:

"Now that version 4.1 introduces a safer sapi module, we recommend that you configure PHP as a module in Apache."

So the problem exists with running both versions of Apache with PHP as a module.
 [2004-06-01 07:49 UTC] dtan at ftl dot co dot jp
I am experiencing the same thing.  Downloaded the latest snapshot of PHP5 and am currently running it as a module using Apache 1.3.29. Each refresh seems to add about 2-8mbs of memory to the child process.
 [2004-06-01 08:29 UTC] prof_moriarty at veryfast dot biz
The memory taken per refresh is seems to be entirely dependent on the script you're running.
Goes up by a few k when i run small scripts, but when i run major processing scripts, it uses megs (as it normally would), but neglects to clear them when done.
 [2004-06-02 03:09 UTC] dtan at ftl dot co dot jp
Yes I noticed that too.  I ran a script which basically checks for a single variable and otherwise just spits out html.  It still increased by about 100k.   Running phppgadmin increases the process mem by a few MB.  I am running windows 2000 and apache 1.3.31 and the lastest snapshot.  Seems this might be a windows dev/config issue:

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

dtan
 [2004-06-02 14:01 UTC] prof_moriarty at veryfast dot biz
Not a windows issue:
from:
http://bugs.php.net/bug.php?id=27758

"Apache 2.0.48 on Gentoo"

Seems someone has bug squishing to do. :)
 [2004-06-04 09:39 UTC] dtan at ftl dot co dot jp
Bug 27758 has seemingly been squashed.  I have taken the latest CVS snapshot and the problem seems to be resolved.  Seems like memory is actually being freed ;)

dtan
 [2004-06-12 18:42 UTC] prof_moriarty at veryfast dot biz
Bug seems to be fixed in PHP5-RC3, for both Apache 1.x and 2.x.
I believe this bug can now be closed.
 [2004-06-13 14:55 UTC] derick@php.net
Ok, closing then.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC