couchdb - Hanging replications on Cloudant -
in last months, we've been charged lot of http requests not expecting on cloudant. looking @ couchdb console locally, found out each continuous replication request issued every 5 seconds or so.
i have stopped continuous replications find in futon , did same every cloudant accounts have. looking @ cloudant's dashboard, have seen reduction of requests (many thousands), did not went down reasonable level. there must continuous replications left, cannot find them.
how can find , stop remaining replications?
to identify continuous replications may hidden user, best way query curl command, invoke _active_tasks, , apply jq filter display tasks of type "replication".
that say, in command line, run command of following form:
curl 'https://username:password@username.cloudant.com/databasename/_active_tasks | jq 'map(select(.type == "replication"))'
the same methodology can applied retrieve other active tasks (view_compaction, database_compaction, etc.)
that said, in general, cloudant-based replication smoother when using _replicator database. so:
1) initial one-time task, create database:
https://username.cloudant.com/_replicator
2) then, create document every replication. if have "continuous":true in doc treated continuous.
3) then, cancel replication delete document.
all of above commands (e.g. creating , deleting documents) documented on cloudant's website throughout stack overflow, please refer there further details.
finally, imperative add usr_ctx field replication gets triggered , run within user context. critical shows when query _active_tasks, otherwise it'll run anonymously , show in _active_tasks if queried admin. precisely happened in case of original poster.
Comments
Post a Comment