Re: [Zope] Refresh causes spinning Zope (bug with my Product?)
Please stay on the list! John Ziniti wrote at 2004-4-6 17:25 -0400:
Dieter Maurer wrote:
Maybe, you try it and report back. I have been unable to convince Jeremy that the "clear" is useful. Maybe, your data points can make this issue clearer.
I do notice large lots of memory usage when I Refresh. Memory on the running Zope seems to be about 388 MB, and it seems to spike up to 700-1000 MB when refreshing.
You loose all memory in your cache... That is what I expect.
I would be willing to try your patch and report back results to the list.
Add "orig_cache.clear()" in the definition of "_resetCache" in ".../ZODB/Connection.py" (method of class "Connection") after "orig_cache = self._cache".
I'm aware that there's no guarantee that this won't brake anything. We do keep good backups aroundm, but can you at least let me know if your patch does any voodoo that will make it *likely* to brake anything, or can I pretty sure that my ZODB will be OK afterwards?
In earlier ZODB versions (that distributed with Zope 2.6.x), "clear" caused a SIGSEGV. Then, I used "minimize" instead of "clear". The current ZODB version (that distributed with Zope 2.7) does not have problems with "cache.clear()". We use it without problems. -- Dieter
Dieter Maurer wrote:
I would be willing to try your patch and report back results to the list.
Add "orig_cache.clear()" in the definition of "_resetCache" in ".../ZODB/Connection.py" (method of class "Connection") after "orig_cache = self._cache".
Dieter, thanks for all your help on this; but it appears that our problems have cleared up, so I won't be able to provide data points in support of the clear(). A summary: The objects being refreshed had a rather large data structure mistakenly assigned to an object attribute. The first request after refresh iterated through a list of these objects for a quick "status report", which meant that this large data structure was unpickled for all of the objects -- this took a lot of time and a lot of memory. Obviously, this was just bad code. The data structure was moved to a volatile attribute, and after packing and restarting the ZEO backend, the objects are *much* smaller and the refresh is almost instantaneous. Thanks again and sorry I could help you out more, JZ
participants (2)
-
Dieter Maurer -
John Ziniti