Re: PHP 4.0 Bug #5641: php module fails to release memory

From: Date: Tue, 18 Jul 2000 14:57:20 +0000
Subject: Re: PHP 4.0 Bug #5641: php module fails to release memory
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24947@lists.php.net to get a copy of this message
> Well the string created by this script is 20,971,520 ( 10*2^21) long > so It should at least take 20MB of memory... Are we talking about the same script here? The script you sent was: <?php $a="0123456789"; for($i=0;$i<21;$i++)$a.=$a; print strlen($a); unset($a); ?> Surely the length of this string is only 210 characters. I suppose you meant to have two nested loops here? > My best solution is probably to run PHP as a CGI for the tasks that > use up a lot of memory. This way all the memory is released each time > at the end. A better solution would be to just lower your MAX_REQUESTS_PER_CHILD setting a bit so your httpd processes get recycles more often. Unless the really memory hungry scripts get run a lot. -Rasmus

« previous php.dev (#24947) next »