[Zope] monitoring Zope with Daemontools (svscan)

Paul Winkler pw_lists@slinkp.com
Thu, 13 Mar 2003 12:01:19 -0500


On Wed, Mar 12, 2003 at 02:31:52PM -0800, Davis Marques wrote:
> I'm having some trouble getting my Zope 2.5.1 to work with Daemontools. 

It's not very nice I'm afraid :(

> exec setuidgid zope /usr/local/zope/bin/python \
>   $INST_HOME/z2.py \
>   -m -d -w 80 -f 21 -F '' -Z ''

Have you tried running this command from the console?
Get this command working first before you start worrying
about daemontools. I notice at least two things wrong with it:

1) z2.py -m expects the next argument to be a port number.
To disable the monitor port, you want "-m -"

2) z2.py detaches from the terminal unless you give the -D (debug)
option. Yes, this sucks. You can either roll with it and give -D,
or do what I did and write a script that launches zope,
receives the signals that daemontools sends, and kills 
or restarts zope as necessary.  This sort-of works for me, it's not
very reliable and i'm not sure why.

BTW, Zope 2.7 is expected to finally start isolating the many
things that the -D option toggles; you'll be able to run
zope in the foreground or background as you please regardless of 
the other "debug" options.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's FUNCTIONARY X-STETOSCOPE!
(random hero from isometric.spaceninja.com)