<div>Hi, </div>
<div>In my application, some background threads are being created. But when a thread finishes up its work, a strange exception is thrown:</div>
<div>The callstack doesn&#39;t show any part of my application code. </div>
<div>=====================================================================================</div>
<div>Traceback (most recent call last):<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\server\taskthreads.py&quot;, line 48, in handlerThread<br>&nbsp;&nbsp;&nbsp; task.service()<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\server\serverchannelbase.py&quot;, line 207, in service
<br>&nbsp;&nbsp;&nbsp; task.service()<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\server\http\httptask.py&quot;, line 71, in service<br>&nbsp;&nbsp;&nbsp; self.channel.server.executeRequest(self)<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\server\http\wsgihttpserver.py&quot;, line 63, in executeRequest
<br>&nbsp;&nbsp;&nbsp; task.write(self.application(env, start_response))<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\app\wsgi\__init__.py&quot;, line 55, in __call__<br>&nbsp;&nbsp;&nbsp; request = publish(request, handle_errors=handle_errors)<br>
&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\publisher\publish.py&quot;, line 183, in publish<br>&nbsp;&nbsp;&nbsp; request.close()&nbsp; # Close database connections, etc.<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\publisher\base.py&quot;, line 301, in close
<br>&nbsp;&nbsp;&nbsp; held.release()<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py&quot;, line 60, in release<br>&nbsp;&nbsp;&nbsp; self._f()<br>&nbsp; File &quot;C:\Python24\Lib\site-packages\ZODB\Connection.py&quot;, line 235, in close
<br>&nbsp;&nbsp;&nbsp; raise ConnectionStateError(&quot;Cannot close a connection joined to &quot;<br>ConnectionStateError: Cannot close a connection joined to a transaction</div>
<div>=====================================================================================</div>
<div>My worker thread are created using threading.Thread based classes. </div>
<div>&nbsp;</div>
<div>Does anybody throw some light about this error? </div>
<div>&nbsp;</div>
<div>Thanx for your help. </div>
<div>&nbsp;</div>
<div>With regards,</div>
<div>-shailesh</div>
<div>&nbsp;</div>