From roymathew at bellsouth.net Fri Dec 15 14:21:14 2006 From: roymathew at bellsouth.net (Roy Mathew) Date: Fri, 15 Dec 2006 08:21:14 -0500 Subject: [Z3-sqlos] Database error (connection closed) Message-ID: <17794.41290.28207.124812@lata.anoobe.com> I've seen this quite a few times on the server that I am using (in a production context) and the only recourse I have is to delete the adapter utility and recreate it. File "/usr/local/Zope3/src/zope/tales/expressions.py", line 217, in __call__ return self._eval(econtext) File "/usr/local/Zope3/src/zope/tales/expressions.py", line 211, in _eval return ob() File "/usr/local/Zope3/src/zope/app/container/size.py", line 38, in sizeForDisplay num_items = len(self._container) File "/var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/container.py", line 182, in _ _len__ i += utility.select().count() # optimal, does not get all objects File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/sresults.py", line 189, in count count = self.accumulate('COUNT(*)') File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/sresults.py", line 173, in accumulate return conn.accumulateSelect(self, *expressions) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.py", line 391, in accumulateSelect val = self.queryOne(q) File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.py", line 358, in queryOne return self._runWithConnection(self._queryOne, s) 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.py", 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: ("Shouldn't load state for 0xb55d when the connection is closed",) Can someone tell me if this looks familiar. -- Thanks, Roy Mathew. From jinty at web.de Fri Dec 15 14:44:30 2006 From: jinty at web.de (Brian Sutherland) Date: Fri, 15 Dec 2006 14:44:30 +0100 Subject: [Z3-sqlos] Database error (connection closed) In-Reply-To: <17794.41290.28207.124812@lata.anoobe.com> References: <17794.41290.28207.124812@lata.anoobe.com> Message-ID: <20061215134430.GA11573@minipas.home> On Fri, Dec 15, 2006 at 08:21:14AM -0500, Roy Mathew wrote: > > I've seen this quite a few times on the server that I am using (in a > production context) and the only recourse I have is to delete the > adapter utility and recreate it. > > File "/usr/local/Zope3/src/zope/tales/expressions.py", line 217, in __call__ > return self._eval(econtext) > File "/usr/local/Zope3/src/zope/tales/expressions.py", line 211, in _eval > return ob() > File "/usr/local/Zope3/src/zope/app/container/size.py", line 38, in sizeForDisplay > num_items = len(self._container) > File "/var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/container.py", line 182, in _ _len__ > i += utility.select().count() # optimal, does not get all objects > File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/sresults.py", line 189, in count > count = self.accumulate('COUNT(*)') > File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/sresults.py", line 173, in accumulate > return conn.accumulateSelect(self, *expressions) > File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.py", line 391, in accumulateSelect > val = self.queryOne(q) > File "/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.py", line 358, in queryOne > return self._runWithConnection(self._queryOne, s) > 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.py", 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: ("Shouldn't load state for 0xb55d when the connection is closed",) The real exception is hidden behind this DatabaseException. The description looks like a ZODB exception, not sure why, but some ideas: * There was a bug a while back when people use persistent zope database adapters. * Trying to put a sqlobject instance into the ZODB. I'd try defining the necessary utilities in zcml rather than through the ZMI and see if the issue goes away. Hope that helps. > > Can someone tell me if this looks familiar. > > -- > Thanks, > Roy Mathew. > _______________________________________________ > z3-sqlos mailing list > z3-sqlos at codespeak.net > http://codespeak.net/mailman/listinfo/z3-sqlos > -- Brian Sutherland Metropolis - "it's the first movie with a robot. And she's a woman. And she's EVIL!!"