couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Lindström <carlantonlindst...@gmail.com>
Subject Detect failed replication tasks
Date Mon, 06 Feb 2017 20:53:02 GMT
Hi,

I'm having some troubles with detecting connection failures in a continuous
replication between two CouchDB 2.0 instances. My goal is to replicate a
database from instance A to instance B and if something goes wrong, I need
a way to detect that fast. If I start a replication and then kill instance
A (^C), it takes over 2 minutes before the `replication_state` changes from
`triggered` to `error`. I'm using the following replicator settings:

[replicator]
max_replication_retry_count = 0
connection_timeout = 4000
retries_per_request = 1

The replication job is created on instance B like this:

curl -XPUT http://instance-b/_replicator -d '{
    "_id": "my_replication",
    "source":  "http://instance-a:5984/test/",
    "target":  "http://127.0.0.1:5984/test/",
    "create_target":  true,
    "continuous":  true
}'

The reasoning behind the low retry numbers was to make the replication job
fail fast so that we know that instance B can contain stale documents. It
doesn't seem to work though :)
Is it possible to detect these kinds of errors in, let's say, 10 seconds?


Thanks,
Anton

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message