[Zope-dev] What's the recommended Zope-Squid configuration?
Hi, I found two HOWTOs on setting up Squid as web cache for Zope. One of them is from http://www.zope.org/Members/htrd/howto/squid In this config, Squid and Zope communicate with each other via ICP. Zope is started with --icp option. No Accelerated HTTP Cache Manager is used (or is it necessary?) The other one is from http://www.zopelabs.com/cookbook/1043965452 This config requires patching of AcceleratedHTTPCacheManager.py (patch provided). Zope does not need --icp option, but Accelerated HTTP Cache Manager is added to communicate with Squid via PURGE method. What's the difference? Which configuration is recommended for performance? Any other recommended config? Many thanks! Regards, Zhi Min ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] debugging memory leaks
Seb Bacon wrote: So, say Foo is leaking because it is referenced from O which can't be collected. Given 100 things which refer to Foo, how do I identify which one is O? And of course, then O may be leaking because it is referenced from P... I've been looking into memory leaks of my own, and put together a small module that outputs the information available from the gc.garbage list in a format that Graphviz (http://www.research.att.com/sw/tools/graphviz/) can then render as an image (GIF, SVG, etc) that makes it a bit easier to see the cycles. Here's a sample image: http://barryp.org/misc/simpletal_visualize/test2.gif Here's the code http://barryp.org/misc/simpletal_visualize/visualize_pyobjects.py It shouldn't be too hard to use that in your own code, something like: import visualize_pyobjects gc.collect() cycles = visualize_pyobjects.prune_stems(gc.garbage) visualize_pyobjects.create_dot(cycles, '/tmp/foo.dot') and then, run the graphviz 'dot' program from the command line to create a GIF file: dot -Tgif /tmp/foo.gif (use a '-Tsvg' option to create an SVG file, which is smaller and easily viewed and edited with things like sodipodi I believe) Barry ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] debugging memory leaks
Tim Peters wrote: [Seb Bacon] ...but my (naive?) reading of the documentation was that reference cycles are cleaned out by the garbage collector, *unless* they define a __del__ (which is not the case here). How am I wrong? You're reading the docs correctly. It's not necessarily cycles directly involving Foo objects that causes Foo objects to leak, it can be instead that some other (non-Foo) objects in cycles can't be collected, from which the Foo objects are in turn reachable. When an object O can't be collected, then neither can any object reachable from O. gc.get_referrers() can be used to find objects that refer to a given Foo instance. It's also possible that a something S refers to a Foo instance where S doesn't participate in cyclic gc. Then any cycle containing S is immortal, regardless of whether __del__ methods are defined in the cycle, and also then gc.get_referrers() can't reveal S's existence. Sometimes such an S is in the Python core, or in Zope's C code, although the more recent the release the less likely that is (more & more kinds of objects have been added to cyclic gc over time). Are you sure that *only* Foo objects are leaking? It's pretty rare, when there's a leak, to see only one kind of object leaking. You're right, there seem to be a few other things involved. I think Foo comes out top simply because it is the most numerous instance involved in the leak. So, say Foo is leaking because it is referenced from O which can't be collected. Given 100 things which refer to Foo, how do I identify which one is O? And of course, then O may be leaking because it is referenced from P... I sense this question is a bit like asking someone to explain how to solve a Rubik's Cube in 3 words. but FWIW, the kind of logic I'm using is: - run test case - notice that there are a lot of references to Foo - get an instance of Foo using sys.getobjects(0) - get referrers using gc.get_referrers(Foo) - run garbage collection using gc.collect()? - is Foo still there? Which of its referrers are still there? Incidentally, I've found some other bug. I can get Zope to segfault by calling PickleCache.minimize(3), if a Bar object has been loaded which defines a __del__ method thus: def __del__(self): print "deleting", self.getId() It couldn't be related, could it? (it's borking at a point where it frees memory) Cheers, Seb ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Question about 'The Zope Developer's Guide'
Hi ! I have tried to find 'The Zope Developer's Guide' without lucky. Could you give me a location to download it? Thanks. _ Accede al romance online. Busca y encuentra a tu media naranja entre los perfiles que te interesan. http://match.msn.es/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Bugday Reloaded: The Sequel
Hi all - I'd like to try to have another bug day next Tuesday (Nov 3) to make up for the one that was cut short last week, in preparation for a beta 2 release of Zope 2.7. I know its short notice, but every little bit helps. If you can make it even only for an hour or two it will be much appreciated. thanks! Brian Lloyd[EMAIL PROTECTED] V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Debugging Zope with Eric3
Hi there Zope Folks. I'm new to this list. I've been using Zope on and off for around 3 years just to produce a few simple sites - lots of external methods but no products. However, I'm embarking on a much more ambitious project and am looking to address one of the biggest problems I've encountered in the past, namely debugging. After much googling around, I discovered Eric3, which the release notes indicate has a remote debugging facility which is useful for debugging Zope apps. I've got Eric3 up and running, but the docs are somewhat non-existent and I've not succeeded in getting further than using it as an editor. I've trawled the lists and cant see anything on this subject. Can anyone offer any tips as to how I can debug Zope with Eric3? TeeVeeEm Mark ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )