Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 213 by
shn...@gmail.com: Couchdb connection lost without error
http://code.google.com/p/couchdb-python/issues/detail?id=213
My code contains lots of query in a remote couchdb database. The code
begins to run. After a while, it is just frozen. Any output or error are
not given. When I check the connection, I observe that the couchdb database
connection has been lost. It still busies the cpu without doing anything(it
seems so). What may be the reason of connection loss? Can I check the
connection status in python so that I can open new one if the current one
is closed? My related code is:
def addNewDnsRecord(self, record):
if self.checkHashValue(record['hashValue']):
.... #some code to generate an id
record['_id'] = tempid
self.bulk.append(record) #add record at the end of the bulk
if len(self.bulk) == 1000: #bulk with 1000 records are inserted
self.dns_db.update(self.bulk)
self.bulk = []
def checkHashValue(self, hashValue):
result = self.dns_db.view('records/hashcheck', None, key=hashValue)
if len(result) == 0:
return True
else:
return False
Couchdb : 1.0.1
Python : 2.6.5
Operating system of server which code runs: Ubuntu 10.04
Operating System of server which couchdb runs: Ubuntu 12.04
Any help is appreciated