php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32128 Memory leak
Submitted: 2005-02-27 13:40 UTC Modified: 2005-03-03 22:30 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: i at downfire dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.3.10 OS: linux RH 8.0 Kernel 2.4.x
Private report: No CVE-ID: None
 [2005-02-27 13:40 UTC] i at downfire dot com
Description:
------------
I get a memory leak from the php on the server. (i'm a webhost)

The first second i got 200MB+ and the next my swap is full and memory down to 3700 K.

There is a normal script ran. I redused the usage of php memory to 1M but this does not help us solve te problem.

I use apache 2.0.53 with php 4.3.10 and Asp sun one 4.0.1L.

I have never had this problem with php 4.3.9. it started when i upgraded to 4.3.10. 

I'm gone downgrade to 4.3.9 untill this problem is solved since i can't have my server crash every time.

Can you please help us :)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-27 14:33 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

And if it still happens, provide the configure line you used.

 [2005-02-27 15:03 UTC] i at downfire dot com
I already used the CVS. That does not solve the problem.

I used ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql to configure the php since i don't use any other modules in php.

I'm now compiling apache 1.3.33 with php 4.3.9 to have a look what this does.
 [2005-02-27 23:22 UTC] sniper@php.net
Can not reproduce, please provide a short example script.

 [2005-02-28 01:11 UTC] i at downfire dot com
My english is not that good so here goes:

The script i tried to execute on the server(or better to say, a user tried to) is found at www.subdreamer.com witch is, as the creators of it state "a good pice of php scripting". 
Now i made some changes to the webservers here and now the problem seems to be gone. So i think it's more php with Apache 2.x then the script it self.

Explanation:
I had a linux RH 8.0 server running apache 2.0.53 with php 4.3.10 with a mysql at the side witch would be 3.39.x.

On that configuration the script got out of control and the memory got down to 3700K witch is the minimum of the server memory.

I now `downgraded` the server to Apache 1.3.33 with php 4.3.9. Nou i tested the script that sucked all the memory on this configuration and it runs great.

Could this has something to do with Apache 2.0.53? I looks like php does not work right with the 2.x version of Apache and gets memory leaks.
 [2005-02-28 13:28 UTC] sniper@php.net
What MPM are you using with Apache2 ?

 [2005-02-28 14:03 UTC] i at downfire dot com
The bundeld MPM that's in the apache2 tar?

I never installed any other so it sould be standard.
 [2005-02-28 20:32 UTC] sniper@php.net
What does this output:

# apxs -q MPM_NAME

(find the path to apxs if it's not in your PATH already)

 [2005-02-28 23:09 UTC] i at downfire dot com
I can't find the apxs anywhere tho, the only one the find command found is the apxs in the apache bin directory.

[root@athene /]# find / -name 'apxs'
/root/system_setup/httpd-2.0.45/support/apxs
/root/system_setup/httpd-2.0.53/support/apxs
/root/system_setup/apache_1.3.33/src/support/apxs
/usr/local/apache2/bin/apxs
/usr/local/apache/bin/apxs
/opt/casp/components/apache-bundle/INSTALL/templates/apxs

And when is exec on the apache 2.0.53 apxs i get:
[root@athene bin]# ./apxs -q MPM_NAME
prefork

This the standard for apache i think since i never changed it.

Btw, the 1.3.33 version of apache with php 4.3.9 works great. But the upgrade to 4.3.10 on apache 1.3.33 does also suck my memory when i exec the script so i realy think this has to do with the php then the apache server since i never had this with 4.3.9 on Apache2.

I find it verry strange.
 [2005-03-01 13:21 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-03-02 04:11 UTC] i at downfire dot com
well, i don't realy know what couses the overflow in the script. I get no error about it in de logs anyware. 

The only thing i can say is that the script is avalible at www.subdreamer.com (light version) witch couses the problem. Any other script does not couse a overflow.
 [2005-03-03 22:30 UTC] sniper@php.net
Reopen when you can provide a short reproducing script.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 15:01:32 2024 UTC