couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Matsushita <...@iilab.org>
Subject Cannot prevent replication of design document in couchdb
Date Mon, 17 Mar 2014 13:37:56 GMT
Cross posted here. http://stackoverflow.com/questions/22311868/cannot-prevent-replication-of-design-document-in-couchdb

We're trying to use the couchdb replication over a very high latency link (slow, frequent
disconnections,...). We want to avoid to replicate the design document which is heavy. We
have a filter in place and when using the following curl command, the design document doesn't
appear, as expected:

curl http://x.x.x.x:5984/emr/_changes?filter=emr/user_data
Our replication document is:

{
   "_id": "e0e38be8cc0b11356dfb03bc8400074d",
   "_rev": "1-d77117f03d63099e1e505b9f9de3371d",
   "source": "http://x.x.x.x:5984/emr",
   "target": "emr",
   "continuous": true,
   "filter": "emr/user_data",
   "create_target": true,
   "owner": "jun"
}
We have deactivated authentication while we're debugging. When using an existing database
and removing create_target, the same problem occurs.

The source server outputs the following:

[Mon, 10 Mar 2014 21:22:03 GMT] [info] [<0.135.0>] Retrying HEAD request to http://x.x.x.x:5984/emr/
in 0.25 seconds due to error {conn_failed,{error,etimedout}}
[Mon, 10 Mar 2014 21:23:47 GMT] [info] [<0.135.0>] Retrying GET request to http://x.x.x.x:5984/emr/_design/emr
in 0.25 seconds due to error req_timedout
[Mon, 10 Mar 2014 21:24:14 GMT] [error] [<0.135.0>] Replicator, request GET to "http://x.x.x.x:5984/emr/_design/emr"
failed due to error {error,req_timedout}
[Mon, 10 Mar 2014 21:24:14 GMT] [error] [<0.135.0>] Replication manager, error processing
document `e0e38be8cc0b11356dfb03bc8400074d`: Couldn't open document `_design/emr` from source
database `http://x.x.x.x:5984/emr/`: {'EXIT',{http_request_failed,"GET","http://x.x.x.x:5984/emr/_design/emr",
                         {error,{error,req_timedout}}}}
When using tcpdump, it's clear that the replication fails because the replication manager
attempts to download the heavy design document (http://x.x.x.x:5984/emr/_design/emr).

FYI the replicator's configuration is:

replicator  connection_timeout          5000    
            db                          _replicator 
            http_connections            1   
            max_replication_retry_count 3   
            retries_per_request         1   
            socket_options              [{keepalive, true}, {nodelay, true}]    
            ssl_certificate_max_depth   3   
            verify_ssl_certificates     false   
            worker_batch_size           1   
            worker_processes            1
Hope someone can help!

--

Jun Matsushita
Co-founder, CEO

mobile: +44 7429 144 691
skype: junjulien

iilab.org
@iilab
information innovation lab





Mime
View raw message