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" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>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, [EMAIL PROTECTED] wrote:
> > >ID: 8889
> > >User Update by: [EMAIL PROTECTED]
> > >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] [EMAIL PROTECTED]
> > >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] [EMAIL PROTECTED]
> > >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] [EMAIL PROTECTED]
> > >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: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to