From: Wesley Darlington (wesley at domain blackstar.co.uk)
Date: Mon 29 May 2000 - 13:36:01 IST
Hi All,
On Mon, May 29, 2000 at 12:52:15PM +0100, Donncha O Caoimh wrote:
> While working on a data streaming app I think I stumbled upon something
> strange.
> I test the server by launching "wget" X number of times from another
> machine, usually 50 at a time with a "sleep 1" in-between.
> The server responds with data sent from a PHP routine that loops via a
> while (true) {
> }
> loop.
> Unfortunetly, when I kill the client side wget processes it doesn't seem
> to close the connection on the server side! Further testing creates more
> Apache processes and the server eventually stops responding to new
> connections..
> Does anyone know if this is normal behaviour when doing infinite loops
> in server side scripting?
> (or else it's a PHP4 bug..)
AFAIK, the server will stop when the server process tries to
write to the socket and discovers that it's gone. Y'know the
sort of thing ... and there it was, gone! It'll keep merrily
running if it's doing something that doesn't involve output.
Does your infinite loop write anything? If it is writing
something at every stage in the loop, then you may have a
different problem... :-)
Wesley.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:17 GMT