OK, here's my situation. I'm running a windows 98 machine (i.e., not very stable) with multiple windows users. Therefore, the current user occasionally gets logged out, or the machine itself crashes, killing the zope process. The server does generally get restarted, so uptime is not a problem with this setup. Since the database appears to only be saved to disk during a shutdown or a pack, this basically means that at irregular (but frequent) times out of my control, the database can be easily lost. The person logging out of the current account does not have (nor should have) the access to Zope's management interface needed to do a shutdown on the server or a pack of the database. Since I have set up the ability for some remote users to do some content management, and they might do this at literally any time without my knowledge, this is a problem. Even the logs do not help; the logs apparently disappear in such a situation (not tested fully), so I have no way of knowing even THAT the users have changed something, much less what. What I basically am wondering is if there is a way to force Zope to flush the database to disk at periodic intervals, whether by packing the database (undo is not as important to me as not having unknown amounts of data disappear entirely into the bit bucket when there is a problem) or by forcing a flush in some other way I found this little snippet in ApplicationManager.py, but I'm not sure what to do with it exactly, or even if this is the best place to start twiddling around with the source: def manage_shutdown(self): """Shut down the application""" for db in Globals.opened: db.close() sys.exit(0) def manage_pack(self, days=0, REQUEST=None): """Pack the database""" t=time.time()-days*86400 db=self._p_jar.db() t=db.pack(t) if REQUEST is not None: REQUEST['RESPONSE'].redirect( REQUEST['URL1']+'/manage_workspace') return t If I don't resolve this issue, Zope won't be of much use to me (changing environments isn't very likely right now), and I'll have to go back to a static web site. Do you think running Zope as a Windows Service via the registry would help? (At least, it might help with the "logging out current user" aspect. It won't help with the system crashes.) - Gregor vorlon#iglou.com
participants (1)
-
Gregor