On Wed, 2007-06-13 at 10:49 -0400, Daniel Drake wrote:
> But, I see that the latest zdaemon only tries for 10 seconds and then
> gives up anyway, which would avoid this problem. So you could either
> change the sleep to 0.1s and increase the "n > 10" check to "n > 100",
> or you might consider something like the attached patch (applies against
> zdaemon-2.0a6)
Attaching the patch this time.
--
Daniel Drake
Brontes Technologies, A 3M Company
From: Daniel Drake <[EMAIL PROTECTED]>
For the first second, retry the zdrun socket at 100ms intervals. After 1
second, if the socket is still not ready, then slow down to 1s intervals
until the final timeout.
This results in a 31% speedup of our database start on boot, and a 53% speedup
of database start from hot caches.
Index: zdaemon-2.0a6/src/zdaemon/zdctl.py
===================================================================
--- zdaemon-2.0a6.orig/src/zdaemon/zdctl.py
+++ zdaemon-2.0a6/src/zdaemon/zdctl.py
@@ -199,15 +199,18 @@ class ZDCmd(cmd.Cmd):
try:
if self.get_status():
was_running = True
-
+
+ sleepval = 0.1
while not cond():
+ if n == 10:
+ sleepval = 1
sys.stdout.write(". ")
sys.stdout.flush()
- time.sleep(1)
+ time.sleep(sleepval)
n += 1
if self.get_status():
was_running = True
- elif was_running or n > 10:
+ elif was_running or n > 19:
print "\nDaemon manager not running."
return
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - [email protected]
http://mail.zope.org/mailman/listinfo/zodb-dev