Re: Forced garbage collection
| From: | Andi Gutmans | Date: | Thu, 29 Jun 2000 18:18:50 +0000 |
| Subject: | Re: Forced garbage collection | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-22859@lists.php.net to get a copy of this message | ||
Actually PHP is supposed to clean up after itself at the end of the
request, it does so since PHP 3 (maybe even PHP/FI 2).
How about upgrading to PHP 4.0.1 and mailing us again with new
stats/information.
Andi
On Thu, 29 Jun 2000, Peter Kocks wrote:
> Hi all,
>
> I have php script that grows apache to over 71M on a system. The script
> parses an XML message that is over 19,000 lines long. The problem is not
> that the script takes up 71M (although that's higher than I'd like), it is
> that after the script ends, the apache daemon stays at 71M. It seems that
> either there is a memory leak or that garbage collect did not occur.
>
> Is there any way to force php to do garbage collection? Or has it certainly
> occurred when a script ends?
>
> Is there a way to force apache to recycle an httpd daemon at the end of a
> request, so the OS cleans up the memory?
>
> My real problem is that I end up with a dozen 71M apache daemons after
> servicing several requests and I run out of swap space. If I had just one
> or two 71M daemons I'd be fine.
>
> (Apache/1.3.12 (Unix) PHP/4.0b4pl1) running on Solaris 2.7. Yes, I know
> php4.0b4pl1 is old and I will fix that. However, I'd still like to know if
> there is a way to force memory cleanup in some way regardless if the latest
> rev of php fixes this problem.
>
> Thanks in advance
>
> Peter Kocks
>
>
>