Re: strange exception
Sanjay Rao <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
After this traceback transaction.commit hangs forever. On Thursday, 29 December 2016 11:44:56 UTC+5:30, Sanjay Rao wrote: > > Here is the complete traceback > > 2016-12-29T11:32:06 ERROR txn.12584 Error in tpc_abort() on manager < > Connection at 050d79e8> > Traceback (most recent call last): > File > "C:\Python27\lib\site-packages\transaction-1.6.1-py2.7.egg\transaction\_transaction.py" > , line 431, in _cleanup > rm.tpc_abort(self) > File > "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\Connection.py", > line 736, in tpc_abort > self._storage.tpc_abort(transaction) > File > "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\ClientStorage.py", > line 1140, in tpc_abort > self._tbuf.clear() > File > "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\TransactionBuffer.py" > , line 120, in clear > ZODB.blob.remove_committed(blobfilename) > File "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\blob.py", > line 931, in remove_committed > os.remove(filename) > WindowsError: [Error 32] The process cannot access the file because it is > being used by another process: u > 'D:\\sites\\sites_7_0_scale\\batonSites1\\CheckerServer\\var\\blobs\\15\\0x00ee6jme.tmp-' > > > > > On Thursday, 29 December 2016 05:48:03 UTC+5:30, Jim Fulton wrote: >> >> >> >> On Wed, Dec 28, 2016 at 12:11 AM, Sanjay Rao <[email protected]> wrote: >> >>> My system raises below exception first in randomly one of the transaction >>> >>> File "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\blob.py", >>> line 931, in remove_committed >>> os.remove(filename) >>> WindowsError: [Error 32] The process cannot access the file because it >>> is being used by another process: u >>> 'D:\\sites\\sites_7_0_scale\\batonSites\\CheckerServer\\var\\blobs\\124\\0x00cdvcft.tmp-' >>> >>> >>> >> Please don't trim tracebacks. >> >> >> >>> >>> After this in a couple of subsequent transactions ClientDisconnected >>> Error is reported >>> >>> >>> File >>> "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\ClientStorage.py" >>> , line 846, in loadBefore >>> result = self._server.loadBefore(oid, tid) >>> File >>> "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\ClientStorage.py" >>> , line 92, in __getattr__ >>> raise ClientDisconnected() >>> ClientDisconnected >>> >>> >> I suspect that this is a result of the error above. >> >> >>> >>> After this error all transactions start throwing following error >>> >>> >>> 2016-12-22T14:30:19 ERROR ZODB.Connection Couldn't load state for >>> baton.baton.BatonSite 0x1b >>> Traceback (most recent call last): >>> File >>> "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\Connection.py", >>> line 899, in setstate >>> self._setstate(obj, oid) >>> File >>> "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\Connection.py", >>> line 943, in _setstate >>> p, serial = self._storage.load(oid, '') >>> File >>> "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\ClientStorage.py", >>> line 825, in load >>> result = self.loadBefore(oid, m64) >>> File >>> "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\ClientStorage.py", >>> line 851, in loadBefore >>> self._cache.store(oid, tid, end, data) >>> File "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\cache.py", >>> line 139, in _locked_wrapper >>> return func(inst, *args, **kwargs) >>> File "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\cache.py", >>> line 647, in store >>> self._store(oid, start_tid, end_tid, data, size) >>> File "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\cache.py", >>> line 661, in _store >>> nfreebytes = self._makeroom(size+1) >>> File "C:\Python27\lib\site-packages\zeo-4.3.0-py2.7.egg\ZEO\cache.py", >>> line 447, in _makeroom >>> del current[oid] >>> File >>> "C:\Python27\lib\site-packages\zodb-4.4.3-py2.7.egg\ZODB\fsIndex.py", line >>> 167, in __delitem__ >>> del tree[key[6:]] >>> KeyError: '_\t' >>> >>> >>> >>> If I >>> >>> - catch ClientDisconnectedError in transaction >>> >>> >>> - Close the connection and database. >>> - Reopen database and connection >>> >>> then subsequent transactions work properly. Can it be an issue in >>> connection cache etc ? >>> >> >> I can't tell what you're doing. What do you mean by "close connection >> and database" and "reopen connection and database"? Are you creating a >> client storage in each thread? >> >> I wonder if there's a problem with shared blob caches on windows. >> >> I never touch windows myself. IDK if there are other ZODB users who use >> Windows who could help you. >> >> Jim >> >> >> >>> >>> >>> >>> On Wednesday, 28 December 2016 11:55:27 UTC+5:30, Jim Fulton wrote: >>>> >>>> >>>> >>>> On Tue, Dec 27, 2016 at 10:01 PM, Sanjay Rao <[email protected]> >>>> wrote: >>>> >>>>> No issues. >>>>> Sometimes just discussing problem with you guys gives a solution. >>>>> >>>> >>>> Glad to hear it. >>>> >>>> Handling ClientDisconnected exception and closing/reopening database >>>>> server solved my problem. >>>>> >>>> >>>> Hm, that shouldn't have been necessary. Clients reconnect after being >>>> disconnected. >>>> >>>> Did you really restart the server? >>>> >>>> Do you know why the client got disconnected? >>>> >>>> Were there errors in the server log? >>>> >>>> I also don't see how a disconnected client could produce the errors you >>>> reported. >>>> >>>> <shrug> >>>> >>>> Jim >>>> >>>> -- >>>> Jim Fulton >>>> http://jimfulton.info >>>> >>> -- >>> 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. >>> >> >> >> >> -- >> Jim Fulton >> http://jimfulton.info >> > -- 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.