We have a process submitting documents to couchdb. It works fine most of the time, but once in a while a design document will fail with
{"error":"unauthorized","reason":"You are not a db or server admin."}
I am a bit stuck because I don’t know why 100 or so documents would succeed but then one would fail. The same document has successfully been uploaded before.
Any ideas?
It turns out it was cookie related.
The cookies store in the client was being lost, because I was hosting it in an asp.net application. LoveSeat creates a new cookie store for every instance of CouchDatabase so either I needed to keep the CouchDatabase as a global or create a different cookies store (I did the later in the end).