AgriConnect

Project Sheet

Name
AgriConnect
Product Description
An AI-powered chatbot that helps extension officers support farmers at scale
Repository Link
https://github.com/akvo/rag-doll
Product Documentation
Tech Stack

List of technologies used to execute the technical scope of the project:

  • Front
  • Back
  • BD
  • Testing
  • CI
  • Hosting
Asana Link
https://app.asana.com/0/1207876388691339/1209041847057525
Slack Channel Link proj-agriconnect-general

How to diagnose issues if something fails

1. Health Check Endpoint

Before diagnosing issues, it is important to verify the health status of the containers. The Agriconnect platform provides an endpoint to check the health of its services:

Health Check URL: https://agriconnect.akvotest.org/api/health-check 

Purpose

The health check endpoint returns the status of the containers, indicating whether they are up and running. A successful health check implies that the services are operational.

Expected Response

When all containers are healthy, the endpoint returns a JSON response similar to the following:

{
  "status": "healthy",
  "services": {
    "rabbitmq": true,
    "chromadb": true,
    "database": true,
    "assistant": true,
    "eppo-librarian": true,
    "backend": true
  }
}

Response Details

2. Diagnosing Issues

If the health check indicates that one or more services are not operational (i.e., the status of a service is false), follow these steps to diagnose and resolve the issue:

a. Identify the Affected Service(s)

Review the JSON response from the health check to pinpoint which services have a false status.

b. Check Logs

Access the logs for the affected service(s) to identify any error messages or anomalies that may indicate the cause of the issue. Since we use Google Cloud, you will need to check the logs using the Google Cloud Console. Access Google Cloud Console:

Within the workloads, identify the container with an unhealthy status. Select this container and then navigate to the "Logs" tab to view its logs. Analyzing these logs can provide insights into the issue, such as error messages or patterns that suggest the cause. A common issue might be related to an unstable Socket.IO connection, but the logs will help pinpoint the specific problem. Use this information to begin debugging and addressing the issue.

c. Restart the Service

If the issue is not apparent from the logs, restarting the affected service(s) may resolve the problem. This can be done by deleting the pods associated with the unhealthy container. 

In the Google Cloud Console, navigate to the "Manage Pods" section for the specific container that is reported as unhealthy. Within this section, you can access the "Pods Detail" view. By deleting the pod from this view, the container will automatically restart, which may help restore it to a healthy state. This process is often effective in clearing transient issues that cause service disruptions.

3. Most Common Issues

Below are examples of some common issues that may occur on the Agriconnect platform, along with their related containers and explanations.