[Zope3-dev] ServerControlForm.html / Restart, Shutdown does not work

Tim Peters tim.peters at gmail.com
Tue Jul 19 14:52:07 EDT 2005


[Tim Peters]
...
>> Best guess is that the stuff above never "worked" in Zope3, and that's
>> the meaning of the ""TODO:  ... does not work yet" comments in
>> zope/app/server/servercontrol.py.

[Adam Groszer]
> Yes, you're right. I just missed my old buddy, the Shutdown function.
> I think the functions were designed with a "daemonic" Zope in mind,
> but that won't on win32.

Running Zope as a Windows Service plays that role on win32, and over
the last year Mark Hammond contributed code intending to make Zope2
run cleanly as a Windows service.  AFAIK, though, none of that code
made its way into Zope3.

> I think it is still a better way to stop Zope3, than simply closing the
> command window in which it is running (ouch, that hurts).

Yes, it is better.  The way it's shutting down now (using the button)
at least allows the C runtime libraries to flush and close files, just
by virtue of allowing Python (which is a C program) to exit cleanly.

> What do you say, can there be any data loss if I use the Shutdown
> button? Does Zope write everything out to disc before it quits?

It didn't look to me like there's any code in Zope3 now supporting
controlled ("graceful") shutdown, although this is the first time I
looked at Zope3's shutdown code and may have missed something. 
There's elaborate (probably _overly_ elaborate) code in Zope2 trying
to do controlled shutdown.

> Or, a better question: how to stop Zope3 cleanly (and when possible
> quickly, for development sessions)?

Sorry, no idea here.  Anyone else?


More information about the Zope3-dev mailing list