Maintenance¶
This document outlines key maintenance tasks for the In-Dataset Discovery Service.
Regular Maintenance Tasks¶
Monitoring Service Health¶
Regularly monitor the service health using the /health endpoint to ensure all components are functioning correctly.
API Key Management¶
- Scayle credentials: The default LLM is Scayle (
LLM_PROVIDER=scayle). A chat API401means the credentials were rejected. RotateSCAYLE_PASSWORDand restart the pods that should pick it up. - OpenAI API Key: Required only when
LLM_PROVIDER=openai. - LangChain API Key: If using LangSmith, monitor usage and ensure the key is valid.
Dependency Updates¶
Regularly update dependencies to: - Fix security vulnerabilities - Get bug fixes and performance improvements - Stay compatible with external services (Overpass API, Scayle, Qdrant, etc.)
Log Monitoring¶
Monitor application logs for:
- Error patterns that may indicate issues
- Performance degradation
- Authentication/authorization failures
- Downstream service failures (Scayle, Overpass, Wikidata, Qdrant retrieval_degraded, PostgreSQL)
Database Connection Management¶
For POST /text2sql, GET /explore, POST /text2sql4ap, and POST /explore4ap:
- Monitor database connection performance
- POST /text2sql uses credentials from the request. GET /explore and the analytical-pattern endpoints use DB_USER and DB_PASSWORD.
- Watch for retrieval_degraded when RETRIEVAL_ENABLED is on and the Qdrant collections are missing.
Troubleshooting¶
Common Issues¶
- Scayle errors: A
401is a credential failure. Timeouts, DNS errors, and5xxmean the chat API is unreachable. CheckSCAYLE_BASE_URL. - Overpass or Wikidata failures:
GET /text2georeturns503when those services cannot be reached, and404when no place is found. - Database connection failures: For
POST /text2sql, check the requestdb_info. ForGET /exploreand the analytical-pattern endpoints, checkDB_USER,DB_PASSWORD, and, on those endpoints,contentUrl. Those connection failures return424. - Authentication Failures: Verify OIDC provider configuration and token validity.
- Retrieval:
retrieval_degradedat startup means text-to-SQL is running without few-shot examples from in-cluster Qdrant.
Performance Optimization¶
- Monitor response times for each endpoint
- Consider caching frequently accessed data (e.g., Wikidata lookups)
- Optimize LLM prompts to reduce token usage and improve response times
- Monitor and optimize database query performance for text-to-SQL operations