[Zope-dev] zdaemon fix

Guido van Rossum guido@python.org
Sat, 05 Oct 2002 03:29:37 -0400


We recently had an event at a customer site where a ZEO process was
started with bogus arguments that kept spewing messages in the log
file forever: the zdaemon module kept restarting the program, and the
program kept failing (without logging a message!).

I think we've all gone through this.  Killing the rogue program is a
bit of a pain because it dies before the pid file is written.

I am thinking of a fairly simple change to zdaemon: if it finds that
it is continuously respawning the program more than 10 times in 2
minutes, it assumes there is a fatal error, log a PANIC level message,
and exit.  (I took the criterion, but not the response from init(8).)

Are there any concerns about checking this in?  This would go into
Zope 2.7 and ZODB 3.1, and could possibly be backported to 2.6 and
2.5.

--Guido van Rossum (home page: http://www.python.org/~guido/)