Closed GoogleCodeExporter closed 8 years ago
This is not normal - couchdb-python 0.8 and the main development both behave as
expected on my machine (Ubuntu 11.04).
Can you provide working example code we can run that reliably reporoduces the
problem? Also, is there anything else in your environment, e.g. an HTTP proxy,
that could be affecting things?
Original comment by matt.goo...@gmail.com
on 27 Sep 2011 at 9:19
Just have tried adopted version of your script against CouchDB 1.1.0 on Gentoo
Linux 3.0.4:
import logging
import couchdb
from uuid import uuid4
from couchdb.http import ResourceConflict
db = couchdb.Database('http://localhost:5984/temp')
def insert_couchdb( msg):
doc_id = uuid4().hex
try:
msg['_id'] = doc_id
db.save(msg)
except ResourceConflict:
logging.warn('Possible doc save failure id: %s db: %s' % (doc_id, db.name))
#time.sleep(6)
if not db[doc_id]:
logging.warn('Failed save a doc with id %s db: %s' % (doc_id, db.name))
logging.debug('%s %s' % (doc_id, msg))
return False
except:
logging.error('Unknown exception while trying to save document id: %s db: %s' % (doc_id, db.name))
return False
return True
insert_couchdb({'foo':'bar'})
...and it doesn't reproduced for me and never was. Could you provide additional
info about CouchDB version and is there any proxies in front of it? This
behavior is quite common for POST requests so I wonder why it happened for PUT
one.
Original comment by kxepal
on 27 Sep 2011 at 9:24
Hi all,
Thanks for your comments.
I am using 1.1.0 now, but the same error happened in 0.11 also. There are no
proxies in between my program and couchdb.
This issue does not happen consistently. See this for example:
tail -n 10000 /var/log/couchdb.log | grep PUT | awk '{print $14}' | sort | uniq
-c
8168 201
609 409
tail -n 100000 /var/log/couchdb.log | grep PUT | awk '{print $14}' | sort |
uniq -c
49398 201
4383 409
Let me know if any more information is required.
with regards,
raj
Original comment by rajkum...@gmail.com
on 28 Sep 2011 at 5:42
Since we haven't been able to reproduce this, closing.
Original comment by djc.ochtman
on 6 Jul 2014 at 12:15
Original issue reported on code.google.com by
rajkum...@gmail.com
on 27 Sep 2011 at 9:01