Re: closed connection during Zope2 request

"Jens W. Klein" <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Organization Klein & Partner KG
Message-ID <[email protected]>
The most common case when this appears is when you set an persistent
object to an non persistent which is bound (as part of a dict, list or
attribute, ... or alike) to a global or a thread local variable and then
survives the request/response cycle.

Most commonly here it a wrong usage of caches or some kind of registries.

Jens

On 2016-09-29 18:43, Mauro Amico wrote:
> Hi.
> 
> We keep running into errors like "ZODB.Connection Shouldn't load state
> for ...", but they don't seem to be due to the usual persistent objects
> cached in ramcache
> or similar, because we have those errors in several different situations
> and on different installations with different custom packages.
> 
> By analyzing on depth we noticed a weird behavior. It looks like the
> connection is somehow closed in the middle of a request. We tried to get
> more info saving the stack in the _debug_info of the connection with
> traceback.format_stack() everytime the connection close happens, in
> order to eventually print it in case of exception like "ZODB.Connection
> Shouldn't load state for ..."
> 
> Below you can find some lines of the stack traces that we get when we
> run into the errors.
> What looks weird to us is that apparently it suddenly calls the __del__
> of a ZApplication.Cleanup instance that's on hold on the request,
> therefore closing the ZODB connection.
> 
> Any ideas about why this is happening or about what else we can
> investigate on?
> 
> Thanks in advance
> 
> Mauro.
> 
> ...
> File
> "/opt/cache/buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py",
> line 182, in __init__
>     self.program = program
> File
> "/opt/cache/buildout/eggs/Zope2-2.13.23-py2.7.egg/App/ZApplication.py",
> line 84, in __del__
>     self._jar.close()
> File
> "/opt/cache/buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py",
> line 384, in close
>     self.setDebugInfo("%s" % traceback.format_stack())
> 
> ----------------------------
> 
> ...
> File
> "/opt/cache/buildout/eggs/Products.PlonePAS-5.0.9-py2.7.egg/Products/PlonePAS/plugins/ufactory.py",
> line 72, in _getPAS
>     return self.acl_users
> File
> "/opt/cache/buildout/eggs/Zope2-2.13.23-py2.7.egg/App/ZApplication.py",
> line 84, in __del__
>     self._jar.close()
> File
> "/opt/cache/buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py",
> line 384, in close
>     self.setDebugInfo("%s" % traceback.format_stack())
> 
> ----------------------------
> 
> ...
> File
> "/opt/cache/buildout/eggs/Zope2-2.13.23-py2.7.egg/Products/PageTemplates/Expressions.py",
> line 88, in trustedBoboAwareZopeTraverse
>     path_items = list(path_items)
> File
> "/opt/cache/buildout/eggs/Zope2-2.13.23-py2.7.egg/App/ZApplication.py",
> line 84, in __del__
>     self._jar.close()
> File
> "/opt/cache/buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/Connection.py",
> line 384, in close
> 


-- 
Klein & Partner KG, member of BlueDynamics Alliance

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.