Re: [Zope-dev] Re: Five registerPackage results in unresolved ConflictError
On Thu, May 22, 2008 at 8:20 AM, Dieter Maurer [EMAIL PROTECTED] wrote: Sasha Vincic wrote at 2008-5-21 12:47 +0200: On Tue, May 20, 2008 at 8:30 PM, Rob Miller [EMAIL PROTECTED] wrote: Philipp von Weitershausen wrote: Believe something very very rotten in Five's registerPackage was fixed by Rocky in r72986 [1]. As far as I can tell this was never merged to the 1.4 branch, but I could we wrong. This seams to work when you start instances without debug, which production is but it still fails the same way with debug on. This looks like the misfeature Zope does not start in debug mode when a single product import fails. In non debug mode, product import failures are logged but Zope nevertheless starts. Well the thing is it doesn't fail in non debug mode. Before it said Failed to install Five and everything in that instance was broken but with this change the instance works fine in non debug mode. /Sasha ___ Zope-Dev maillist - Zope-Dev@zope.org 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] Re: Five registerPackage results in unresolved ConflictError
On Tue, May 20, 2008 at 8:30 PM, Rob Miller [EMAIL PROTECTED] wrote: Philipp von Weitershausen wrote: Believe something very very rotten in Five's registerPackage was fixed by Rocky in r72986 [1]. As far as I can tell this was never merged to the 1.4 branch, but I could we wrong. This seams to work when you start instances without debug, which production is but it still fails the same way with debug on. i can confirm that this seems to be helping. there's an easier way to generate the error that Sasha is seeing... you can reliably reproduce it on Zope 2.9.x w/ Five 1.4 just by starting a zeo server with no Data.fs file, and then trying to connect with a zeo client. if you have any five:registerPackage tags, the first connection will _always_ fail with a ConflictError. subsequent connections will work, but the initial one will fail. (we've had to put a './zopectl run do_nothing.py' steps into our build code... :-P) So you run ./zopectl run do_nothing.py before you started each instance? Is that better then my doInstall() check? /Sasha anyway, the error is not happening with Zope 2.10 and Five 1.5.6. glad to know it's been resolved. :-) -r [1] http://svn.zope.org/?rev=72986view=rev Sasha Vincic wrote: Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone 2.5.5 /Sasha On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hi On a server we have a ZEO server with 6 clients. When we start/restart the server we often get on random instance an AttributeError @@plone and all other browser pages. I have tracked it down to a ConflictError when installing Five on startup. See traceback bellow. To solve this I tried to set enable-product-installation = off to all except one instance but I still got errors. For now we restart the broken instances until they work, I have tried to set sleeping times up to couple seconds between the instances but it didn't make any difference. Five fails when it tries to execute the registerPackage in zcml files. Not the same product every time. First I thought it didn't respect the enable-product-instalation but that is checked in App.Product.initializeProduct method. So I played in fiveconfigure.py with transaction.savepoint() but no success but if I manually check App.Product.doInstall like in the diff below Now my question is if this is correct solution for the problem or will it have other side effects that I am not aware of? How do I write tests for an ConflicError during startup? /Sasha Index: fiveconfigure.py === --- fiveconfigure.py(revision 86781) +++ fiveconfigure.py (working copy) @@ -23,7 +23,7 @@ import warnings import App.config -from App.Product import initializeProduct +from App.Product import initializeProduct, doInstall from App.ProductContext import ProductContext import Products from zLOG import LOG, ERROR @@ -265,6 +265,8 @@ if not hasattr(module_, '__path__'): raise ValueError(Must be a package and the \ package must be filesystem based) +if not doInstall(): +return app = Zope2.app() try: 2008-05-16 11:48:17 ERROR Zope Couldn't install Five Traceback (most recent call last): File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py, line 783, in install_product initmethod(context) File /Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py, line 31, in initialize zcml.load_site() File /Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py, line 41, in load_site _context = xmlconfig.file(file) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py, line 560, in file context.execute_actions() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py, line 612, in execute_actions callable(*args, **kw) File /Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py, line 285, in _registerPackage
[Zope-dev] Re: Five registerPackage results in unresolved ConflictError
Forgot to say that this is Zope 2.9.8, Five 1.4 branch from svn, Plone 2.5.5 /Sasha On Fri, May 16, 2008 at 12:03 PM, Sasha Vincic [EMAIL PROTECTED] wrote: Hi On a server we have a ZEO server with 6 clients. When we start/restart the server we often get on random instance an AttributeError @@plone and all other browser pages. I have tracked it down to a ConflictError when installing Five on startup. See traceback bellow. To solve this I tried to set enable-product-installation = off to all except one instance but I still got errors. For now we restart the broken instances until they work, I have tried to set sleeping times up to couple seconds between the instances but it didn't make any difference. Five fails when it tries to execute the registerPackage in zcml files. Not the same product every time. First I thought it didn't respect the enable-product-instalation but that is checked in App.Product.initializeProduct method. So I played in fiveconfigure.py with transaction.savepoint() but no success but if I manually check App.Product.doInstall like in the diff below Now my question is if this is correct solution for the problem or will it have other side effects that I am not aware of? How do I write tests for an ConflicError during startup? /Sasha Index: fiveconfigure.py === --- fiveconfigure.py(revision 86781) +++ fiveconfigure.py(working copy) @@ -23,7 +23,7 @@ import warnings import App.config -from App.Product import initializeProduct +from App.Product import initializeProduct, doInstall from App.ProductContext import ProductContext import Products from zLOG import LOG, ERROR @@ -265,6 +265,8 @@ if not hasattr(module_, '__path__'): raise ValueError(Must be a package and the \ package must be filesystem based) +if not doInstall(): +return app = Zope2.app() try: 2008-05-16 11:48:17 ERROR Zope Couldn't install Five Traceback (most recent call last): File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py, line 783, in install_product initmethod(context) File /Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py, line 31, in initialize zcml.load_site() File /Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py, line 41, in load_site _context = xmlconfig.file(file) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py, line 560, in file context.execute_actions() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py, line 612, in execute_actions callable(*args, **kw) File /Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py, line 285, in _registerPackage transaction.commit() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py, line 96, in commit return self.get().commit(sub, deprecation_wng=False) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 380, in commit self._saveCommitishError() # This raises! File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 378, in commit self._commitResources() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 433, in _commitResources rm.commit(self) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py, line 484, in commit self._commit(transaction) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py, line 518, in _commit raise ConflictError(object=obj) ConfigurationExecutionError: ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f, class App.Product.Product) in: File /Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml, line 5.4-5.65 five:registerPackage package=. initialize=.initialize / Traceback (most recent call last): File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py, line 56, in ? run() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py, line 21, in run starter.prepare() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py, line 98, in prepare self.startZope() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py, line 257, in startZope Zope2.startup() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py, line 47, in startup
[Zope-dev] Five registerPackage results in unresolved ConflictError
Hi On a server we have a ZEO server with 6 clients. When we start/restart the server we often get on random instance an AttributeError @@plone and all other browser pages. I have tracked it down to a ConflictError when installing Five on startup. See traceback bellow. To solve this I tried to set enable-product-installation = off to all except one instance but I still got errors. For now we restart the broken instances until they work, I have tried to set sleeping times up to couple seconds between the instances but it didn't make any difference. Five fails when it tries to execute the registerPackage in zcml files. Not the same product every time. First I thought it didn't respect the enable-product-instalation but that is checked in App.Product.initializeProduct method. So I played in fiveconfigure.py with transaction.savepoint() but no success but if I manually check App.Product.doInstall like in the diff below Now my question is if this is correct solution for the problem or will it have other side effects that I am not aware of? How do I write tests for an ConflicError during startup? /Sasha Index: fiveconfigure.py === --- fiveconfigure.py(revision 86781) +++ fiveconfigure.py(working copy) @@ -23,7 +23,7 @@ import warnings import App.config -from App.Product import initializeProduct +from App.Product import initializeProduct, doInstall from App.ProductContext import ProductContext import Products from zLOG import LOG, ERROR @@ -265,6 +265,8 @@ if not hasattr(module_, '__path__'): raise ValueError(Must be a package and the \ package must be filesystem based) +if not doInstall(): +return app = Zope2.app() try: 2008-05-16 11:48:17 ERROR Zope Couldn't install Five Traceback (most recent call last): File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py, line 783, in install_product initmethod(context) File /Users/sasha/Development/eea-buildout-clean/products/Five/__init__.py, line 31, in initialize zcml.load_site() File /Users/sasha/Development/eea-buildout-clean/products/Five/zcml.py, line 41, in load_site _context = xmlconfig.file(file) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/xmlconfig.py, line 560, in file context.execute_actions() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/zope/configuration/config.py, line 612, in execute_actions callable(*args, **kw) File /Users/sasha/Development/eea-buildout-clean/products/Five/fiveconfigure.py, line 285, in _registerPackage transaction.commit() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_manager.py, line 96, in commit return self.get().commit(sub, deprecation_wng=False) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 380, in commit self._saveCommitishError() # This raises! File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 378, in commit self._commitResources() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/transaction/_transaction.py, line 433, in _commitResources rm.commit(self) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py, line 484, in commit self._commit(transaction) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/ZODB/Connection.py, line 518, in _commit raise ConflictError(object=obj) ConfigurationExecutionError: ZODB.POSException.ConflictError: database conflict error (oid 0x28f61f, class App.Product.Product) in: File /Users/sasha/Development/eea-buildout-clean/src/plone.session/plone/session/configure.zcml, line 5.4-5.65 five:registerPackage package=. initialize=.initialize / Traceback (most recent call last): File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py, line 56, in ? run() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/run.py, line 21, in run starter.prepare() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py, line 98, in prepare self.startZope() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/Startup/__init__.py, line 257, in startZope Zope2.startup() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/__init__.py, line 47, in startup _startup() File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/Zope2/App/startup.py, line 103, in startup OFS.Application.initialize(application) File /Users/sasha/Development/eea-buildout-clean/parts/zope2/lib/python/OFS/Application.py, line 304, in
Re: [Zope] zope 2.8.5 becomes unresponsive.
I have had zopes like that on different linux versions. Following identified reasons on the different installations: 1. LDUF timeout(s) where -1 After upgrading LDUF where you could set timeouts and linux/zope version the operation -1 timeout caused deadlock and no response from zope for 5-15 minutes, depending on the timeout in the system call. Setting the timeout 0 solved it on this instance. 2. LinguaPlone had a bug or something, Jodok found this and it's fixed on the trunk. 3. Suspect: CacheFu - Memcache broken On Fedora 3 zope 2.8.x, I hade CacheFu and no debug on so I didn't see that the Memcache product in CacheFu was broken due missing memcache module. After turning the zope into debug and removing the Memcache product it has worked perfect. Hope this helps. /Sasha ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Strange behaviour - 3 links which should be the same don't
On 1/24/06, Martijn Pieters [EMAIL PROTECTED] wrote: On 1/24/06, Sasha Vincic [EMAIL PROTECTED] wrote: Following 3 URLs should return the same content but they don't, why? Without tracebacks we have little to go on to help you. Please provide them. Well I don't have any tracebacks, no errors just different output even though it should be the same dtml method called. It is probably the same method called but on the first link without the trailing / the utf8 encoded content is displayed right but not in the other two links. Seems as if dtml-var abstract is behaving different for the links. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope vs Plone: performance issues!
On 1/24/06, Peter Bengtsson [EMAIL PROTECTED] wrote: On 1/24/06, Hugo Ramos [EMAIL PROTECTED] wrote: Hi all, I'm responsible for a big corporate intranet and corporate portal. They were using Zope/Plone before I got here and the problems are too many. Let's talk about performance issues... Plone is VERY SLOW responding snip Yes! But not good enough. Most performance issues with Plone can be solved by caching. Don't underestimate it. Yes Plone is slow but with caching you get very good performance. I have boosted performance on plone sites from default 1-3req/s to 100req/s and then it was the bandwith that was the bottleneck. The sites where serving both anonymous and authenticated content. I recommend to check out the CacheFu product and documentation in the collective. /Sasha Lovely Systems - www.lovelysystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope vs Plone: performance issues!
On 1/24/06, Hugo Ramos [EMAIL PROTECTED] wrote: Well... They were already using Zope's cache and Squid to proxy some static HTML I guess the problem is Plone itself... Skins etc... As I said and Limi, check out CacheFu. With it you can cache most of your site not just some static HTML and you cache it with Squid so Zope will have more time for the none cachable stuff. Doing profile on your site is something you should always do when optimizing. Follow Dieters recommendation and then CacheFu. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Strange behaviour - 3 links which should be the same don't
On 1/24/06, Dieter Maurer [EMAIL PROTECTED] wrote: The three links may be different with respect to the effective base URL. The first two have the same base URL which is the same as second link. The third link doesn't have any base, which is strange. Well I got something more to check then. /S ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope vs Plone: performance issues!
On 1/24/06, Michael Vartanyan [EMAIL PROTECTED] wrote: How did you go about caching authenticated content? Any simple personalization element like the user name in the corner disqualifies the whole page from effective participation in downstream proxying/caching. The only thing you can do with such page is to cache it for one particular user hoping that s/he may need the same page again (which is not likely). Well I did cache the page for each user, because most of the content on a site isn't that dynamic that has to be reloaded every second. Should content on a page change you invalid them for everyone. Even if the cache is for short period it's worth it. How: I used CacheFu and the description there. And to finish the picture - publication and access times are important for records purposes so the current server time should be displayed on all pages. Well this is a problem, here you have something that invalidates the page every second or at least minut, but still caching one minute is worth alot on an active site. There are probably ways to do this with JS so it's on the client side instead but then you can't be 100% that it's the same time as on server but it shouldn't diff that much if you initiate the JS with right time. If your dynamic parts are not to complicated I would consider Squid3 and ESI. /Sasha ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-dev] Anyone using ZEO and ZOPE to create offline clients?
Hi, Are there any projects where there have been attempt to build zope clients which can work offline and when online they will be synchronize with the ZEO storage? Other solutions with zsyncer are also interesting, right now I just look for info about existing attempts. /Sasha smime.p7s Description: S/MIME cryptographic signature ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )