|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-03-29 15:05 UTC] tingle at virtuanews dot co dot uk
Description: ------------ Hi, Whilst using PHP locally I am experiencing a major problem with memory usage. When I start up apache it uses around 15mb of memory (apache.exe that is) Now as a test I sat hitting refresh on the index page of phpmyadmin installed locally for a few minutes, and the memory usage of apache.exe reached 150mb +. It seems to be using a certain amount of memory to load the page, then not releasing it as the usage never goes down, only up with each page refresh. This issue does NOT happen with PHP4, I am using the latest CVS version of PHP5 compiled by you for windows. I also have apache 2.0.49 and mysql 4.0.18 installed. I realise this is a pretty usless bug report in terms of finding a solution, but that is because I do not know what to give you. Please let me know how I can help to solve this problem - I'm sure needed to restart apahe after every thousand or so page refreses due to memory usage of nearly 200mb is not the intended use of PHP! Thanks Tingle PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
Same Problem here. System is : Apache 2.0.48 on Gentoo, using latest snapshot of PHP5 ( php5-200405131230 ) Memory Leak happens while running following code : <html><body><?php for ( $x=0; $x<600; $x++ ) { $db = mysql_connect("localhost", "user", "password"); mysql_select_db("database"); $sql = "select * from tab"; // About 17.000 Big Records $result = mysql_query($sql); // !!! causes MEM-Leak !!! mysql_close($db); } ?></body></html> Mem-Leak differs in Size. When reducing load eg. by making the loop smaller it disapears sometime. It happens at the Point where the Data ist loaded into the result-Array. Greetings, Adam