Forced garbage collection

From: Date: Thu, 29 Jun 2000 18:17:24 +0000
Subject: Forced garbage collection
Groups: php.dev 
Request: Send a blank email to php-dev+get-22856@lists.php.net to get a copy of this message
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

« previous php.dev (#22856) next »