Re: PHP 4.0 Bug #8889 Updated: Memory is not being freed.

From: Date: Mon, 30 Apr 2001 19:54:49 +0000
Subject: Re: PHP 4.0 Bug #8889 Updated: Memory is not being freed.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-53122@lists.php.net to get a copy of this message
Memory is never returned to the system with libc memory allocation. When you need memory it enlarges the address space it is using. Freeing memory won't make it shrink its address space. All I can suggest is to write your scripts in a way that if it deals with many SQL queries free a query before you do the next. This way the maximum size of your scripts memory space will hopefully be smaller. Andi At 02:37 PM 4/30/2001 -0500, Brian Moon wrote:
The big problem is that the memory is never returned to the system. The Apache process holds on to it until it dies. Brian Moon ------------------------------------------------------------------------- Phorum Dev Team - http://phorum.org Making better forums with PHP ------------------------------------------------------------------------- Look for my presentation at ApacheCon 2001. "Caching Dynamic Web Content to Increase Dependability and Performance" http://www.apachecon.com/ ----- Original Message ----- From: "Andi Gutmans" <andi@zend.com> To: <brian@phorum.org>; <php-dev@lists.php.net> Sent: Monday, April 30, 2001 1:45 PM Subject: Re: [PHP-DEV] PHP 4.0 Bug #8889 Updated: Memory is not being freed. 14MB of memory in use isn't necessarily that much. Some of that memory might be in shared libraries (shared across the Apache processes). Are you doing any big SQL queries in those scripts? Do you have time to do some tests and let us know if things improve? Andi At 06:31 PM 4/30/2001 +0000, brian@phorum.org wrote:
ID: 8889 User Update by: brian@phorum.org Status: Open Bug Type: Performance problem Description: Memory is not being freed. I am talking about nearly endless amounts. I saw Apache processes with
as
much as 14MB of memory in use. Brian. Previous Comments:
---------------------------------------------------------------------------
[2001-04-29 19:59:56] zeev@php.net What kind of sizes are we talking about here? the Zend memory manager holds a memory cache, but we're talking at around 1MB per process max.
---------------------------------------------------------------------------
[2001-01-26 18:45:45] brian@phorum.org Ok, this is just like what is described in http://marc.theaimsgroup.com/?l=php-dev&m=97923602322593&w=2 which contains a hacked up solution. It looks like it should be able to turn into a usable end solution.
---------------------------------------------------------------------------
[2001-01-24 13:21:13] brian@phorum.org Hi guys, I do not have much information. I know that my Apache processes memory
is
growing by the minute. If I start a separate server on another port and serve only static pages and files through it, those process do not grow. I have tried what I remembered of gdb but have not come up with anything. I know I need to attach to a process and it seems I can `gdb {pid}` but that gives me nothing. How can I get some info for you guys? I do have --enable-debug. thanks, Brian. Phorum.org
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8889 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#53122) next »