Community Health Toolkit

Medic API failing after replication

Hello, am trying to create replica application of my main CHT core application. I started replication roughly a week ago but now while trying to login as a user frontend displays “Polling replication data” and then “Loading error”

I checked the logs as shown below in the image

Any Idea on what’s happening and how I can the API back up ?

@atria please provide the steps that were taken when creating the clone. This would greatly help in identifying where to start looking.

Please also share the matching API and couchdb logs. Does couchdb have any running tasks?

@derick I was working with @atria on this, the original instance has cht version 3.6.0 and we are replicating the data in a clean install of cht version 3.7.1. using an ETL application.
below are some of the attached loggs from Couch db

The error that can be seen in the initial post, “The request could not be processed in a reasonable amount of time” indicates that some of the views that the application is querying are not indexed.
This could cause the replication requests to time out as well.

If it’s a new installation, you should wait until the views are indexed before using the app.
If installing via horticulturalist, there should be logs indicating the view indexing progress, otherwise you can check the active tasks yourself (

@antony @derick @gareth @diana Thanks we found that waiting for the views to get indexed, resolved this issue while trying to login as a user.

I think we can improve this experience as outlined in this issue.

1 Like