[Zope3-dev] server restarts

Guido van Rossum guido@python.org
Mon, 12 May 2003 11:09:25 -0400


> It takes approx 30 seconds to shutdown Zope 3 on Windows using CTRL C.
> On Linux it shuts down immediately. Does anyone know what might be
> taking so long on Windows and how I might address it? In development I'm
> restarting the server all the time, so a 30 second improvement will be
> substantial.

I'm surprised it shuts down at all on Windows unless you send another
request.  When you type ^C to a Windows Python program that's waiting
for some I/O (e.g. a socket accept() or recv()), it will only exit
when the I/O operation completes.

I use Control-Break instead of Control-C; it kills the program
immediately.  This should be okay for testing.

You may also grep the source for the number 30; I bet you there's a
select() call somewhere with a 30 second timeout.

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