couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CGS <cgsmcml...@gmail.com>
Subject Re: synchronization problem with couchdb 1.0.1
Date Tue, 27 Dec 2011 10:50:29 GMT
Hi Lucas,

You identified the problem correctly: network connection drop. All the 
errors are coming from that problem. Just to explain a bit, once you 
modify a document, your "push" replication tries to push the new 
document version in the targeted database, but due to the no connection 
condition, dies after a number of retries. I would suggest to use simple 
replication and not continuous one if your connection is unstable. That 
is, every given period, check if the connection is up and send a 
replication request if the network allows it.

Another option is to check your connection periodically (you can 
automatize that by the mean of a simple ping for example) and if the 
connection is dropped, stop the continuous replication (or let it die) 
and start it again when the network conditions allow that. But I would 
put an watchdog on the network connection and not periodically restart 
of the replication.

As far as I could notice from the log, no specific document creates this 
problem, but only the drop in network connection. Therefore, I wouldn't 
worry about the documents correctness for the time being.

CGS







On 12/26/2011 02:18 AM, Lucas Chiesa wrote:
> Hello,
>
> We are using couchdb for a project and so far it has been working
> great. However we have stumble uppon a problem we cannot seem to fix.
>
> I'll try to describe the problem and I'm attaching the logs, without
> any "filtering" because I don't understand what's important and what's
> not.
>
> We have 3 dbs in one way  continuous sync and it all worked OK until,
> for some reason some documents seen to stop the synchronization of one
> of them.
>
> If we manually sync that document like this:
>
> $ curl -H 'Content-Type: application/json' -X POST
> http://localhost:5984/_replicate -d ' {"source": "machines", "target":
> "http://10.8.0.1:5984/machines",
> "doc_ids""f9dfe9e74c9818c136bd5378e40012fa"]} '
>
> {"ok":true,"start_time":"Mon, 26 Dec 2011 00:02:09
> GMT","end_time":"Mon, 26 Dec 2011 00:02:10
> GMT","docs_read":1,"docs_written":1,"doc_write_failures":0}
>
> It works fine, and then the continuous sync works, until we modify
> this document (for example saving it using futon, creating a new rev).
>
> Please note that we were issuing the continuous sync command once per
> minute because of a bug in a cron job. It was supposed to be once per
> hour, and that's because we saw that if the computer lost internet for
> a long time, couchdb dropped the sync.
>
> Most certainly I have not explained the problem correctly, but I don't
> understand it correctly, I hope the logs help better.
>
> Warning: The logs (uncompressed) are almost 40M big....
>
> Thank you very much in advance,
>
> Lucas
>
>
> "Oh no, not again."
>
> - A bowl of petunias on its way to certain death.


Mime
View raw message