Re: [Zope3-Users] recovering from a lost db connection
On Wed, Jan 10, 2007 at 08:13:27PM -0500, Roy Mathew wrote: What is the recommended way to recover from a db connection that is held by a Psycopgda adapter instance? If for some reason postgres goes down, I get the following error: File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 83, in _runWithConnection val = meth(conn, *args) File /usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p , line 351, in _queryOne self._executeRetry(conn, c, s) File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 77, in _executeRetry raise DatabaseException(str(exc.args)) DatabaseException: ('no connection to the server\n',). I then have no recourse but to restart the zope server. In the Java world one would put a try/catch around the the SQL operation and attempt a reconnect, but I am wondering if there is a better way (read: automatic recovery) in a z3 world. The way ZPsycopgDA does it is exactly that. But it can be a little complex when you look at the detail. In the Z3 case, I would: * If the error is a concurrent update error, raise a Retry exception. The same request gets tried again. * If the error is an OperationalError, close the connection and re-raise the error (perhaps as a Retry error, though I can think of cases where this is a bad idea). On the next request, the connection is re-opened. * On other errors, let the error propagate. All this stuff should probably be done at the zope.rdb level. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Brian Sutherland Metropolis - it's the first movie with a robot. And she's a woman. And she's EVIL!! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: selling zope to a CTO
Christophe Combelles wrote: Roy Mathew a écrit : Hi all, Does anyone know of a canned presentation or slides/papers that would help convince an openminded CTO/CIO that Zope (z3) makes business sense in a world dominated by huge J2EE and .NET projects. yes :) but I guess everybody knows it http://oodt.jpl.nasa.gov/better-web-app.mov That's about Zope 2/Plone (which still makes it a great presentation, but I don't think it's what Roy's looking for) -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: selling zope to a CTO
On 1/11/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote: Christophe Combelles wrote: Roy Mathew a écrit : Hi all, Does anyone know of a canned presentation or slides/papers that would help convince an openminded CTO/CIO that Zope (z3) makes business sense in a world dominated by huge J2EE and .NET projects. Good reference projects, with news coverage. Googling often won't help, because the intersting reference tend to look non technical http://www.computerwoche.de/nachrichten/575790/ contains no zope for example but is a zope based product in an eads sub division. www.zope.de contains references, www.zope.org too. Btw. to everybody, how do I add reference sites to zope.org, there is no content type for it. Best regards, Patrick ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: selling zope to a CTO
On 1/11/07, Michael Haubenwallner [EMAIL PROTECTED] wrote: Patrick Gerken wrote: Btw. to everybody, how do I add reference sites to zope.org, there is no content type for it. It is described in http://www.zope.org/Help (Member FAQ), The always undervalued ability of reading... Thank you Michael! http://www.zope.org/Members/do3cc/tsxx_link ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: selling zope to a CTO
Philipp von Weitershausen wrote: |Christophe Combelles wrote: | Roy Mathew a écrit : | Hi all, | | Does anyone know of a canned presentation or slides/papers that would | help convince an openminded CTO/CIO that Zope (z3) makes business | sense in a world dominated by huge J2EE and .NET projects. | | | yes :) but I guess everybody knows it | http://oodt.jpl.nasa.gov/better-web-app.mov | |That's about Zope 2/Plone (which still makes it a great presentation, |but I don't think it's what Roy's looking for) Indeed, I like that presentation very much, and it helped convince our technology managers that Zope made sense; however, it is too technically focused - I was hoping for a 15-20 minute sort of thing with some punch, for the higher level execs. -- Thanks, Roy Mathew.___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Can I use IPython in debugzope stuff ?
Never knew about IPython and really like what I see. Thanks for the hint. I got the debugging to work for Zope3 with the following simple change to the tutorial. IPython.Shell.IPShell(user_ns=locals()).mainloop(sys_exit=1) to IPython.Shell.IPShell(user_ns={'root': root, 'app': app}).mainloop(sys_exit=1) Mats On Wed, 10 Jan 2007 18:17:08 +0100, Philipp von Weitershausen wrote KLEIN Stéphane wrote: Can I use IPython in debugzope stuff ? http://wiki.zope.org/zope2/DebuggingWithIPythonAndOtherTips Should work on Zope 3 as well. -- http://worldcookery.com -- Professional Zope documentation and training 2nd edition of Web Component Development with Zope 3 is now shipping! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Extent catalog question
In my experience (zope2), large full textindexes require more and more cpu time for every new object added to the point where it takes several minutes for each new article uploaded! To avoid this problem, I was hoping to break the index into smaller pieces by using extent catalogs to filter by year. Can extent catalogs help mitigate a scaling issue like this? I've been able to instanciate one extent catalog per year, but it doesn't automatically index content like a normal Catalog. It requires a manual reindex. And to automate indexing content, do I need to implement something like these for an extent catalog? subscriber handler=.catalog.indexDocSubscriber for=zope.app.intid.interfaces.IIntIdAddedEvent / subscriber handler=.catalog.reindexDocSubscriber for=zope.lifecycleevent.interfaces.IObjectModifiedEvent / subscriber handler=.catalog.unindexDocSubscriber for=zope.app.intid.interfaces.IIntIdRemovedEvent / Thanks in advance, Kevin Smith ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Extent catalog question
On Jan 11, 2007, at 1:42 PM, [EMAIL PROTECTED] ksmith93940- [EMAIL PROTECTED] wrote: In my experience (zope2), large full textindexes require more and more cpu time for every new object added to the point where it takes several minutes for each new article uploaded! To avoid this problem, I was hoping to break the index into smaller pieces by using extent catalogs to filter by year. Can extent catalogs help mitigate a scaling issue like this? Sure. There might be considerations with sharing the lexicon or not, but I don't have any advice off the top of my head. I've been able to instanciate one extent catalog per year, but it doesn't automatically index content like a normal Catalog. It requires a manual reindex. And to automate indexing content, do I need to implement something like these for an extent catalog? Neither of these match our experience. :-( I'm not sure what the difference is between our set up and yours. Did you register the extent catalog as an ICatalog? We do... Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Extent catalog question
Nice call. Registering as ICatalog (instead of IExtentCatalog) works perfectly. Thanks! Kevin Smith Gary Poster [EMAIL PROTECTED] wrote: On Jan 11, 2007, at 1:42 PM, [EMAIL PROTECTED] wrote: In my experience (zope2), large full textindexes require more and more cpu time for every new object added to the point where it takes several minutes for each new article uploaded! To avoid this problem, I was hoping to break the index into smaller pieces by using extent catalogs to filter by year. Can extent catalogs help mitigate a scaling issue like this? Sure. There might be considerations with sharing the lexicon or not, but I don't have any advice off the top of my head. I've been able to instanciate one extent catalog per year, but it doesn't automatically index content like a normal Catalog. It requires a manual reindex. And to automate indexing content, do I need to implement something like these for an extent catalog? Neither of these match our experience. :-( I'm not sure what the difference is between our set up and yours. Did you register the extent catalog as an ICatalog? We do... Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] zc.buildout with Zope 2
Hi guys, This may not be the right place for this question, but I'm wondering if anyone has experience or examples using zc.buildout with Zope 2. It seems a useful solution and one that will increase in importance, though so far I've not yet fully grasped what it does or how I use it in my brief encounters with it. I'm wondering whether it is something I should pursue further in the context of Plone development (targeting primarily Zope 2.10 for now), but I don't know if it's even relevant to that platform or if this is unchartered territory. Suggestions? Martin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] recovering from a lost db connection
Brian Sutherland writes: On Wed, Jan 10, 2007 at 08:13:27PM -0500, Roy Mathew wrote: What is the recommended way to recover from a db connection that is held by a Psycopgda adapter instance? If for some reason postgres goes down, I get the following error: File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 83, in _runWithConnection val = meth(conn, *args) File /usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p , line 351, in _queryOne self._executeRetry(conn, c, s) File /var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py, line 77, in _executeRetry raise DatabaseException(str(exc.args)) DatabaseException: ('no connection to the server\n',). I then have no recourse but to restart the zope server. In the Java world one would put a try/catch around the the SQL operation and attempt a reconnect, but I am wondering if there is a better way (read: automatic recovery) in a z3 world. The way ZPsycopgDA does it is exactly that. But it can be a little complex when you look at the detail. In the Z3 case, I would: * If the error is a concurrent update error, raise a Retry exception. The same request gets tried again. * If the error is an OperationalError, close the connection and re-raise the error (perhaps as a Retry error, though I can think of cases where this is a bad idea). On the next request, the connection is re-opened. Brian, Thanks for your response. I am confused - that means that if this is being done *currently* in Psycopgda, I should simply be able to repeat my client request and succeed in the operation. Or is ZPsycopgda something other than plain old psycopgda? I am essentially stuck once I get this error. The stacktrace above shows that a retry was attempted but did not succeed. Sorry that I am missing your point, but I don't get it! * On other errors, let the error propagate. All this stuff should probably be done at the zope.rdb level. -- Thanks, Roy Mathew. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users