Common Errors
This guide covers frequently encountered errors and their solutions.
Database Errors
Connection Refused
Error: connection refused to localhost:5432
Cause: PostgreSQL is not running.
Solution:
docker compose up -d
pgvector Extension Missing
Error: extension "vector" is not available
Cause: pgvector extension not installed.
Solution: Ensure you're using the pgvector Docker image:
# docker-compose.yml
image: pgvector/pgvector:pg16
Embedding Errors
Dimension Mismatch
Error: expected 1536 dimensions, got 3072
Cause: Embedding model mismatch between stored vectors and query.
Solution: Ensure AZURE_EMBEDDING_DEPLOYMENT matches the model used during ingestion. If you change models, you'll need to re-embed all documents.
Rate Limit Exceeded
Error: Rate limit exceeded. Retry after 60 seconds.
Cause: Too many API requests.
Solution:
- Use batch enrichment for large operations
- Add delays between requests
- Check your API quota
Ingestion Errors
Invalid JSON Format
Error: Failed to parse conversations.json
Cause: Export file is corrupted or in wrong format.
Solution:
- Verify the export is from the correct source
- Check file encoding (should be UTF-8)
- Validate JSON syntax
Duplicate Document
Warning: Document already exists, skipping
Cause: Document with same hash already ingested.
Solution: This is expected behavior. Use --force to re-ingest if needed.
Search Errors
No Results Found
No results found for query: "my search"
Possible causes:
- No matching content in knowledge base
- Query too specific
Solutions:
- Check
engram statsto verify documents exist - Try broader search terms
- Use
--hybridfor combined semantic + keyword search
Configuration Errors
Missing Environment Variable
Error: AZURE_OPENAI_ENDPOINT not set
Solution: Set required environment variables in .env:
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_KEY=your_key
Invalid API Key
Error: 401 Unauthorized
Solution: Verify your API key is correct and has appropriate permissions.
Getting Help
If you encounter an error not listed here:
- Check the FAQ
- Search existing GitHub Issues
- Open a new issue with:
- Error message
- Steps to reproduce
- Engram version (
engram --version) - Environment details