On Thu, 21 Jul 2005, Stas Bekman wrote:
LUKE wrote:
Thanks!
But the problem is still exist.
The sample code have some problem. When i telnet then
CommandServer in win32 everything is ok. But if i close
then console window(terminal) immediate, the apache is
hang. CPU use 100% resource.
I try to use
$c->aborted()
OR
($@ == APR::Const::ECONNABORTED )
to check the connect but it can not detect the client is disconnect.
[ ... ]
I'm not sure if this will help, but you might try the use
of APR::Status::is_ECONNABORTED(), as discussed at
http://perl.apache.org/docs/2.0/api/APR/Status.html#C_is_ECONNABORTED_
to check if $@ corresponds to APR_STATUS_IS_ECONNABORTED,
due to variants in the error conditions.
I'm not familiar with windows, but I think you need to run
an equivalent of unix's strace(1), which shows you where
the process is spinning and go from there. (or attach with
debugger, or something else).
Randy, can you write a test that can emulate such a situation?
I'm not sure how to do that - note that this is is based on
the t/protocal/pseudo_http.t test, which should pass on
Win32. However, I can confirm the original problem - open up
a console window, telnet to localhost:port, give a few
commands, then close the window, and the cpu usage due to
the Apache process grows to 100%.
If someone has a test linux box, could they see if things
spin out of control if one uses an xterm to telnet in, and
then closes the xterm? This probably won't happen, but it
would be good to see if it's a Win32-specific problem.
--
best regards,
randy