php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21283 memory leak under Apache2
Submitted: 2002-12-30 01:30 UTC Modified: 2003-05-07 10:09 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: tamagawa at osa dot att dot ne dot jp Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 4.3.1 OS: Windows XP Home Edition
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tamagawa at osa dot att dot ne dot jp
New email:
PHP Version: OS:

 

 [2002-12-30 01:30 UTC] tamagawa at osa dot att dot ne dot jp
I set up PHP4.3.0(DLL) & Apache2.0.43. Each time client browsers access to foo.php file, PHP&Apache leak certain amout of memory.

I put a file named foo.php which contains just 'aaaa' in htdocs directory, and I access that file from mozilla1.2. When i repeatedly reload foo.php, amout memory that Apache2 uses grows(seems about 100 bytes/req). I confirmed the growth with Window's task manager.

Apache's http.conf is 'as is' distributed and PHP4.3's ini is same as ini-recommended.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-30 01:53 UTC] derick@php.net
Does it also leak when you disable PHP (ie. when you dont load the module)?

Derick
 [2002-12-30 03:16 UTC] tamagawa at osa dot att dot ne dot jp
php enabled:foo.php -> leaks
php enabled:foo.html -> does not leak
php disabled:foo.html -> does not leak

the contents of foo.php & foo.html is same, just 'aaaa'.

hope this helps.

tamagawa
 [2003-01-06 20:32 UTC] tamagawa at osa dot att dot ne dot jp
Is there any test I can do to help fixing this problem?
I'm completely new to debugging open source softwares, but I'm willing to do if I could have directions from Wizards.
 [2003-02-12 11:32 UTC] just_another_stupid_name at yahoo dot com
This is/was a bug in Apache.  Try version 2.0.44. Also, search bugzilla on www.apache.org to make sure that you minimize any know PHP issues.
 [2003-02-12 13:01 UTC] sniper@php.net
Does this happen with Apache 2.0.44 ?

 [2003-02-12 16:33 UTC] just_another_stupid_name at yahoo dot com
according to them, no.  i will veryify this tonight and report back.
 [2003-02-12 19:31 UTC] tamagawa at osa dot att dot ne dot jp
I checked with Apache2.0.44+PHP4.3.0 on WinXP home and it still happens.

Here is the Python2.1 script I used for the test.

******************************************
import httplib, time
h=httplib.HTTP('127.0.0.1')

res={}
i=1
for i in range(6000):

    h.putrequest('GET', '/test.php')
    h.endheaders()
    code, msg, headers = h.getreply()
    f = h.getfile()
    data=f.read()
    f.close()

    print i, code
******************************************

test.php contains only 'aaaaa'.
I'll check bugzilla on apache's website anyway.

tamagawa
 [2003-02-12 22:54 UTC] tamagawa at osa dot att dot ne dot jp
Sorry to say that it still happens. tested under winXP.
Amount of memory that leaks seems same as before.

tamagawa
 [2003-02-12 23:21 UTC] sniper@php.net
Hmm...are you sure it's not just apache2 that leaks..?
Try without PHP installed..?

(and please don't use the 'Add Comment' when you reply to your own report!)

 [2003-02-12 23:40 UTC] tamagawa at osa dot att dot ne dot jp
Simply doing

-    h.putrequest('GET', '/test.php')
+    h.putrequest('GET', '/index.html.en')

stops leaking.
(Hope this is the right way to reply my own report...)
 [2003-03-26 22:43 UTC] ianh@php.net
Hi Tamagawa.
we've done a big change in the apache2 <--> php interface in the current CVS head, which may have helped with your issue.

please note that apache will grow in memory usage for a while it is still warming up, until it peaks out (due to the way it uses pooled memory) is it possible you are seeing this?
the way to test this is if you keep seeing a increasing memory utilization after say a 30-40 minutes of hitting your server with a constant load. 

regards
ian
 [2003-04-02 10:56 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-05-05 15:08 UTC] moriyoshi@php.net
Related to bug #2345

(The summary and the OS entry were unexpectedly changed.. weird..)

 [2003-05-05 15:09 UTC] moriyoshi@php.net
grrrr bug #23455

 [2003-05-07 10:09 UTC] moriyoshi@php.net
update version

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 19:01:28 2024 UTC