Tight loops and PHP ruining Apache

From: Date: Sun, 06 Aug 2000 08:45:16 +0000
Subject: Tight loops and PHP ruining Apache
Groups: php.general 
Request: Send a blank email to php-general+get-10309@lists.php.net to get a copy of this message
Hey On SunSITE Denmark, we run a PHP-4.0.x, and we have the problem where people do too tight loops but accident. Like: while($i<numRows($result)) { echo $mysql_result($result,$i,"name"); //Here I forget to increment $i. } (Don't tell me to use mysql_fetch_array() (!), this is not my code, but belongs to the people we host :)) This means that the apache runs forever and swallows all the cpu time it can, and hogs a lot of resources. We run around 150 apache instances at all time (clones), so this is bound to be a problem sooner or later. QUESTION: Has anybody got a workaround for this "tight-loop" problem? Cheers, Soeren Staun-Pedersen - Staun@SunSITE.auc.dk ------ "The internet is full, beat it" - Me.

« previous php.general (#10309) next »