while (true) looping problem

From: Date: Mon, 29 May 2000 11:27:36 +0000
Subject: while (true) looping problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-19666@lists.php.net to get a copy of this message
Not sure if this is a bug or not but here goes. I'm developing a streaming application, using PHP4.0.0 and Apache 1.3.12. Java applets connect to the server and request data which is created on the server via a while (true) { } loop. Unfortunetly, if the client dies, the Apache process on the server doesn't. It still thinks the applet is still around, so hogging resources. Successive requests just build up the number of Apache child processes until the "Max connections" in httpd.conf are exhausted. I'm not 100% certain the while loop is still executing after the applet disconnects, because "mysqladmin extended-status" reports that only one MySQL thread is executing (the mysqladmin command I presume), although there are the correct number of threads connected from Apache. (one per process) Is this a known effect of running an infinite while loop? I'll have to put in a longish timeout if so.. Donncha.

« previous php.dev (#19666) next »