Re: Memory usage with Apache

From: Date: Sun, 27 Jan 2002 16:18:17 +0000
Subject: Re: Memory usage with Apache
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82290@lists.php.net to get a copy of this message
How are you executing top? Sounds like you need to use the -d option for top. Example: $exec - exec("top -d1"); This way, top won't, run and run and run, and run, and run, etc, etc, etc. Try that Paul "Thomas E. Ruth" wrote: > Hello, > > I'm using PHP 4.0.4pl1 with Apache 1.3.14. > > I have a PHP script that accumulates data for insertion into a database. > This script runs in peices and unset()'s variables that contain the data > periodically in hopes of freeing memory for the next batch of records. > Apparently it's not working that way. When I run top and run my PHP > script, the httpd process runs up to 125M of memory usage, and > segfaults. > > Is there a parameter somewhere that says that httpd can't grow to over > 128M of memory usage, or that PHP can't grow to more then this amount > that I can change to prevent my web server from crashing? Or perhaps a > garbage cleanup routine in PHP that actually frees memory that is no > longer being used (these arrays hold max 5X25 of small <10 char > strings). I unset these arrays after they are placed in the database > (and I free the result for the database), but memory just climbs and > climbs until the script ends (if I run it with arguments that yield > smaller results). > > Thanks, > > Tom

« previous php.general (#82290) next »