I want lots of uptime. On my Linux box, and on my Zope. Problem is, there are so many cool products being developed all the time, so I have to restart Zope all the time. Is there a (hackish?) way to update filesystem installed products? This could be a good thing if we want to hotpatch a server of some sort. -Morten ------------------------------------------------------------- How to reply to email: http://home.sol.no/~vidaandr/news/OBSquoting.html (norsk) http://home.sol.no/~vidaandr/news/FAQquoting.html (english) Who is the bigger fool? The fool or the fool who follows him?
This could be a good thing if we want to hotpatch a server of some sort.
-Morten
There was a thread on this a while back but I don't think there was any conclusive outcome. I'd love so see Zope provide a facility for updating of products without restarting the server. It'd make python product development time a lot quicker and besides, restarting the server every time you rev a python product or two isn't really the sort of thing you want in a production system... To be honest, I don't really see why you should need to restart the server anyway... Comments? Chris
Chris Withers wrote:
This could be a good thing if we want to hotpatch a server of some sort.
-Morten
There was a thread on this a while back but I don't think there was any conclusive outcome.
I'd love so see Zope provide a facility for updating of products without restarting the server. It'd make python product development time a lot quicker and besides, restarting the server every time you rev a python product or two isn't really the sort of thing you want in a production system...
To be honest, I don't really see why you should need to restart the server anyway...
Comments?
agree 100%. -- heiko.stoermer@innominate.de innominate AG networkingpeople fon: +49.30.308806-0 fax: -77 web: http://innominate.de
On Thu, May 11, 2000 at 11:17:19AM +0100, Chris Withers wrote:
I'd love so see Zope provide a facility for updating of products without restarting the server. It'd make python product development time a lot quicker and besides, restarting the server every time you rev a python product or two isn't really the sort of thing you want in a production system...
This might not help everyone, but I've been developing my products on a Zope running off a FreeBSD MFS (memory filesystem), with symbolic links to Data.fs and my product source which live on disk. Restarting feels slightly faster than from disk. I didn't time it, though. I had a quick look at Linux's ramdisk HOWTO and all that, but didn't see how to do the same thing. -- Ng Pheng Siong <ngps@post1.com> * http://www.post1.com/home/ngps
Ng Pheng Siong wrote:
On Thu, May 11, 2000 at 11:17:19AM +0100, Chris Withers wrote:
I'd love so see Zope provide a facility for updating of products without restarting the server. It'd make python product development time a lot quicker and besides, restarting the server every time you rev a python product or two isn't really the sort of thing you want in a production system...
This might not help everyone, but I've been developing my products on a Zope running off a FreeBSD MFS (memory filesystem), with symbolic links to Data.fs and my product source which live on disk. Restarting feels slightly faster than from disk. I didn't time it, though.
I had a quick look at Linux's ramdisk HOWTO and all that, but didn't see how to do the same thing.
I did this a long time ago on Linux. IIRC, I got it down to a few seconds for a largish (~50MB) Data.fs. The entire Zope folder was on a ramdisk. Wasn't too difficult, but wasn't really worth it IMO. Should e in the archives somewhere, for ast year IIRC. Bill
"Morten W. Petersen" wrote:
I want lots of uptime. On my Linux box, and on my Zope. Problem is, there are so many cool products being developed all the time, so I have to restart Zope all the time. Is there a (hackish?) way to update filesystem installed products?
This could be a good thing if we want to hotpatch a server of some sort.
I have also wanted this capability ever since I started working with Zope. Real-time updates of a running server can be a necessity. Today I did some research and discovered two ways to accomplish this goal. 1) In production environments, once ZEO is released, it will be possible to run two Zope servers from the same data source. Just put an HTTP redirector in front that forwards HTTP connections to the first Zope if it's available, the second if it's not. When you need to restart Zope, cause your redirector to send new connections to the second process. You'll have to wait for all open connections to close. Restart the first Zope and cause the redirector to send new connections to the first again. Then you can restart the second server. This setup would actually improve Zope's stability. However, I'm not sure that such a redirector currently exists, given the need to reconfigure without restarting. 2) Using the monitor interface, it is indeed possible to reload code in real time. However, odd bugs may creep up in the process, so do this in development mode only. Execute the following, translating the commands to your platform appropriately: cd ZServer/medusa python monitor_client.py localhost 8090 Enter the Zope superuser password. If I recall correctly, in order for monitor_client to validate your password, it must be stored in cleartext format in <zope>/access. Another reason not to do this on production servers! from Products.<yourproduct> import <yourmodulename> then at any time you can execute: reload(<yourmodulename>) As an example, I might use: from Products.PythonMethod import PythonMethod reload(PythonMethod) Now here's the part that's much less obvious. Zope already provides a way to clear almost all objects from the cache so that the new version of your classes can be instantiated, but if you use a timeout value below 3 seconds, it doesn't work! Go to the Control Panel, Database Management, Flush cache. Enter "3" in the text box by the "minimize" button and press "minimize". Any object that hasn't been accessed in the last 3 seconds will be cleared from the cache, forcing nearly all objects to be loaded again from ZODB, thus making use of the new revision to your product. This could all be automated. It would work for most products. Would a product that implements an imperfect "reload" function interest the Zope community? SPEAK UP! Shane @ digicool.com
participants (6)
-
Bill Anderson -
Chris Withers -
Morten W. Petersen -
news-list.zopeļ¼ innominate.de -
Ng Pheng Siong -
Shane Hathaway