[Zope] Problems with pcgi_wrapper.exe
Duncan Booth
duncan@rcp.co.uk
Thu, 1 Jun 2000 15:53:18 +0000
> I am running Zope as a service under WinNT workstation. I am running it
> behind "Personal Web Server". Problem is that pcgi_wrapper.exe seems to
> hang. If I access a page with a large graphic on it I might get the page but
> the graphic will not come but it will still try loading it. Anyone had a
> similar problem?
>
There seem to be a variety of reasons for pgi_wrapper to hang on
NT. In my case, running behind Netscape it hangs when someone
requests an objects and then closes the connection before the
object is sent back from pcgi_wrapper to the Netscape server. In
this situation it appears that Netscape fails to close the pipe, but
never reads from it.
I think there may also be a situation where the NT version can hang
if Zope throws an exception within its handling of the pcgi request
(pcgiReadSocket checks its result only for SOCKET_ERROR
whereas pcgiRead checks for any error or for a 0 return). When
Zope throws an exception it can close its socket without writing the
data and the recv call then repeatedly returns 0. You should be
able to tell if this is the problem because the hung pcgi_wrapper
will be consuming all available CPU. If it hangs because the output
pipe is closed it consumes no CPU.
What I can offer anyone who is having problems with pcgi_wrapper
on NT is a specially patched version that shoots itself after it has
been running for 1 hour (or any other delay if you recompile it). As
a bonus, when it does shoot itself it writes the the pcgi logfile a
message telling you on which line it hung. Unfortunately
(confession time) I don't seem to have saved a copy of the source
for the version that prints out the line number, just the binary. I do
have source though for the version that shoots itself, but doesn't tell
you how far it got. I have uploaded the relevant files to
http://www.zope.org/Members/Duncan/pcgimods
--
Duncan Booth duncan@dales.rmplc.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
http://dales.rmplc.co.uk/Duncan