Re: strange exception

Sanjay Rao <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
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-'



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


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 ?



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] 
> <javascript:>> 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.
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.