[Zope] Hang while waiting for external process
Paul Winkler
slinkp23@yahoo.com
Thu, 15 Nov 2001 17:56:16 -0500
I'm using zope 2.4.3 on linux (redhat 7 with kernel 2.4.14), playing
around with the Photo product (nice one!). I've had a few zope
freezes, and finally found a pattern: Occasionally, if using
ImageMagick to do the rendering for Photo, convert will fail to
complete and Zope will then become completely unresponsive. Browser
requests do nothing.
This is weird. I can understand how one of the Zope threads might get
stuck waiting for the never-ending external process; but why should
Zope become completely unresponsive? Shouldn't the other threads keep
responding?
And is there a way to set a timeout for an external process, such that
zope can recover if it fails to return for too long?
Here's output of ps showing the defunct convert process:
(snip)
891 pts/0 S 0:00 python2.1 /home/pw/Downloads/Zope/z2.py -M /home/pw/C
896 pts/0 S 0:09 \_ /usr/local/bin/python2.1 /home/pw/Downloads/Zope/
919 pts/0 S 0:00 \_ /usr/local/bin/python2.1 /home/pw/Downloads/Z
920 pts/0 S 0:29 \_ /usr/local/bin/python2.1 /home/pw/Downloa
1001 pts/0 Z 0:00 | \_ [convert <defunct>]
921 pts/0 S 0:05 \_ /usr/local/bin/python2.1 /home/pw/Downloa
922 pts/0 S 0:00 \_ /usr/local/bin/python2.1 /home/pw/Downloa
923 pts/0 S 0:00 \_ /usr/local/bin/python2.1 /home/pw/Downloa
I can then get zope to restart by killing any of the zope PIDs.
Here's the big M log leading up to the freeze - nothing unusual:...
requestprofiler.py doesn't show any hangs in this log...
$ tail -f bigM
E 147423764 2001-11-15T17:36:05
B 143413564 2001-11-15T17:36:16 GET /test_crap/my_image_library/nothing
I 143413564 2001-11-15T17:36:16 0
A 143413564 2001-11-15T17:36:16 500 2485
E 143413564 2001-11-15T17:36:16
B 147432596 2001-11-15T17:36:25 GET /test_crap/my_image_library/lilaq-logo.jpg
I 147432596 2001-11-15T17:36:25 0
A 147432596 2001-11-15T17:36:25 304 282
E 147432596 2001-11-15T17:36:25
--
paul winkler
home: http://www.slinkp.com
music: http://www.reacharms.com
calendars: http://www.calendargalaxy.com