Hello, We're having here a problem in a high load situation with quite long running (10-20 secs) transactions. The app uses mySQL extensively, and just a bare minimum of ZODB to store the root and registrations. I think that there's lower level error concerning ZODB, but in zope.rdb, in queryForResults, line 381: except Exception, error: eats the traceback. This smells like https://bugs.launchpad.net/zope3/+bug/98331 So I propose to move that except further down the stack, where it will really catch just DB errors. Or any better idea is welcome. ------------ Module zope.publisher.publish, line 133, in publish result = publication.callObject(request, obj) Module zope.app.publication.zopepublication, line 161, in callObject return mapply(ob, request.getPositionalArguments(), request) Module zope.publisher.publish, line 108, in mapply return debug_call(obj, args) __traceback_info__: <security proxied zope.app.publisher.browser.viewmeta.ManagementViewSelector instance at 0x48822a0c> Module zope.publisher.publish, line 114, in debug_call return obj(*args) Module zope.app.publisher.browser.managementviewselector, line 35, in __call__ item = getFirstMenuItem('zmi_views', self.context, self.request) Module zope.app.publisher.browser.menu, line 181, in getFirstMenuItem items = getMenu(id, object, request) Module zope.app.publisher.browser.menu, line 176, in getMenu return menu.getMenuItems(object, request) Module zope.app.publisher.browser.menu, line 53, in getMenuItems if item.available(): Module zope.app.publisher.browser.menu, line 113, in available view = traverser.traverseRelativeURL( Module zope.app.publication.browser, line 47, in traverseRelativeURL ob = self.traversePath(request, ob, path) Module zope.app.publication.publicationtraverse, line 95, in traversePath ob = self.traverseName(request, ob, name) Module zope.app.publication.publicationtraverse, line 61, in traverseName ob2 = adapter.publishTraverse(request, nm) Module zope.app.container.traversal, line 72, in publishTraverse return self.context[name] Module ....container, line 65, in __getitem__ if not self.__contains__(key): Module ....container, line 111, in __contains__ results = queryForResults(db,query) Module zope.rdb, line 384, in queryForResults raise DatabaseException(str(error)) DatabaseException: Shouldn't load state for 0x50 when the connection is closed -- Best regards, Adam GROSZER mailto:agroszer@gmail.com -- Quote of the day: Major Premise: Sixty men can do a piece of work sixty times as quickly as one man. Minor Premise: One man can dig a posthole in sixty seconds; Conclusion: Sixty men can dig a posthole in one second.
On Fri, Apr 04, 2008 at 08:36:30PM +0200, Adam GROSZER wrote:
Hello,
We're having here a problem in a high load situation with quite long running (10-20 secs) transactions. The app uses mySQL extensively, and just a bare minimum of ZODB to store the root and registrations. I think that there's lower level error concerning ZODB, but in zope.rdb, in queryForResults, line 381:
except Exception, error:
eats the traceback.
This smells like https://bugs.launchpad.net/zope3/+bug/98331
So I propose to move that except further down the stack, where it will really catch just DB errors.
Or any better idea is welcome.
This has come up previously: http://www.nabble.com/zope.rdb-error-and-zope.publisher-error-td10199840.htm...
------------ Module zope.publisher.publish, line 133, in publish result = publication.callObject(request, obj) Module zope.app.publication.zopepublication, line 161, in callObject return mapply(ob, request.getPositionalArguments(), request) Module zope.publisher.publish, line 108, in mapply return debug_call(obj, args) __traceback_info__: <security proxied zope.app.publisher.browser.viewmeta.ManagementViewSelector instance at 0x48822a0c> Module zope.publisher.publish, line 114, in debug_call return obj(*args) Module zope.app.publisher.browser.managementviewselector, line 35, in __call__ item = getFirstMenuItem('zmi_views', self.context, self.request) Module zope.app.publisher.browser.menu, line 181, in getFirstMenuItem items = getMenu(id, object, request) Module zope.app.publisher.browser.menu, line 176, in getMenu return menu.getMenuItems(object, request) Module zope.app.publisher.browser.menu, line 53, in getMenuItems if item.available(): Module zope.app.publisher.browser.menu, line 113, in available view = traverser.traverseRelativeURL( Module zope.app.publication.browser, line 47, in traverseRelativeURL ob = self.traversePath(request, ob, path) Module zope.app.publication.publicationtraverse, line 95, in traversePath ob = self.traverseName(request, ob, name) Module zope.app.publication.publicationtraverse, line 61, in traverseName ob2 = adapter.publishTraverse(request, nm) Module zope.app.container.traversal, line 72, in publishTraverse return self.context[name] Module ....container, line 65, in __getitem__ if not self.__contains__(key): Module ....container, line 111, in __contains__ results = queryForResults(db,query) Module zope.rdb, line 384, in queryForResults raise DatabaseException(str(error)) DatabaseException: Shouldn't load state for 0x50 when the connection is closed
-- Best regards, Adam GROSZER mailto:agroszer@gmail.com -- Quote of the day: Major Premise: Sixty men can do a piece of work sixty times as quickly as one man. Minor Premise: One man can dig a posthole in sixty seconds; Conclusion: Sixty men can dig a posthole in one second.
_______________________________________________ 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 )
-- Brian Sutherland
Hello Brian, I would say, rip that catch-all out. Actually I must not do that otherwise I'll break some people's code. It's maybe time for z3c.rdb or something like this? Friday, April 4, 2008, 10:17:50 PM, you wrote: BS> This has come up previously: BS> http://www.nabble.com/zope.rdb-error-and-zope.publisher-error-td10199840.htm... -- Best regards, Adam GROSZER mailto:agroszer@gmail.com -- Quote of the day: Charity is injurious unless it helps the recipient to become independent of it. - Anonymous
On Mon, Apr 07, 2008 at 09:31:24AM +0200, Adam GROSZER wrote:
Hello Brian,
I would say, rip that catch-all out. Actually I must not do that otherwise I'll break some people's code. It's maybe time for z3c.rdb or something like this?
I think something a whole lot simpler/smaller would definitely be nice. Most of what zope.rdb does is redundant, especially with things like SQLAlchemy and psycopg2 around. In fact this the only 2 features I really need are: * A single interface to get a DB-API like connection as a utility i.e. conn = getUtility(IZopeDatabaseAdapter) * integration with the transaction module In fact, I'd probably be happy with a package that only defines a very basic interface I can use to get a database connection. Basically just something that allows me to do basic things like: conn = getUtility(IDatabaseConnection, name=u'myconn') cur = conn.cursor() cur.execute("SELECT 1") desc, result = cur.fetchall() That way I can start migrating away from zope.rdb and to SQLAlchemy in a regular fashion.
Friday, April 4, 2008, 10:17:50 PM, you wrote:
BS> This has come up previously:
BS> http://www.nabble.com/zope.rdb-error-and-zope.publisher-error-td10199840.htm...
-- Best regards, Adam GROSZER mailto:agroszer@gmail.com -- Quote of the day: Charity is injurious unless it helps the recipient to become independent of it. - Anonymous
-- Brian Sutherland
participants (2)
-
Adam GROSZER -
Brian Sutherland