R2R Service Configuration Troubleshooting Guide: Postgres, Hatchet
This guide addresses common configuration problems for Postgres, and Hatchet services in R2R deployments.Postgres Configuration Issues
1. Connection Failures
Symptom: R2R cannot connect to Postgres database. Possible Causes and Solutions: a) Incorrect connection string:- Verify the
DATABASE_URL
environment variable. - Ensure it follows the format:
postgres://user:password@host:port/dbname
- Check if Postgres is running and accessible from the R2R container.
- Verify network settings in Docker Compose file.
- Confirm that the username and password in the connection string are correct.
- Check Postgres logs for failed authentication attempts.
2. pgvector Extension Missing
Symptom: Vector operations fail or R2R reports missing pgvector functionality. Solution:- Ensure you’re using the
pgvector/pgvector
image instead of the standard Postgres image. - Verify that the pgvector extension is created in your database:
3. Insufficient Resources
Symptom: Postgres performance issues or crashes under load. Solution:- Adjust resource limits in Docker Compose:
- Tune Postgres configuration parameters like
shared_buffers
,effective_cache_size
, etc.
Hatchet Configuration Issues
1. RabbitMQ Connection Problems
Symptom: Hatchet cannot connect to RabbitMQ. Solution:- Verify RabbitMQ connection string:
- Ensure RabbitMQ service is healthy and accessible.
2. Hatchet API Key Issues
Symptom: R2R cannot authenticate with Hatchet. Solution:- Check the Hatchet API key generation process:
- Verify that R2R is correctly reading the API key:
3. Hatchet Engine Health Check Failures
Symptom: Hatchet Engine service fails health checks. Solution:- Verify Hatchet Engine configuration:
- Check Hatchet Engine logs for startup errors.
- Ensure all required environment variables are set correctly.
General Troubleshooting Tips
-
Check Logs: Always start by examining the logs of the problematic service:
-
Verify Network Connectivity: Ensure services can communicate:
-
Check Resource Usage: Monitor CPU and memory usage:
-
Recreate Containers: Sometimes, recreating containers can resolve issues:
-
Verify Volumes: Ensure data persistence by checking volume mounts:
-
Environment Variables: Double-check all environment variables in your
.env
file anddocker-compose.yml
.