Hosting > 3.x > Production Hosting - AWS
Hosting the CHT on Amazon EC2
Couch2pg is deprecated. For data synchronization, refer to CHT Sync.
Some times when couch2pg is replicating documents to postgres, it encounters very large info docs that are larger than the memory allocation of the document sync array and causes out-of-memory errors. To fix this, we need to delete this document so that couch2pg can proceed. Below are steps to follow to achieve this.
lib/importer.js
in the couch2pg source code to be able to log the doc-id of the problem docconsole.log(row.doc._id);
curl --head "<HOST>/<DB>/<DOC_ID>"
This returns something likeHTTP/1.1 200 OK
Cache-Control: must-revalidate
Content-Length: 307
Content-Type: application/json
Date: Tue, 25 Jun 2019 11:58:29 GMT
ETag: "2-6beeb38da9b096bacfe2fa769e5171be"
Server: CouchDB/2.3.1 (Erlang OTP/21)
X-Couch-Request-ID: e4aa7a8696
X-CouchDB-Body-Time: 0
The ETag is the rev. Delete document with curl: curl -X DELETE "<HOST>/<DB>/<DOC_ID>?rev=<THE_REV>"
Hosting the CHT on Amazon EC2
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.