-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Description
Description
Currently, the /_mgmt/ping endpoint in the STAC FastAPI pgstac implementation always returns a positive message ({"message": "PONG"}) without actually checking if all services are available, especially the PgSTAC database.
Problem
This creates a misleading health/readiness check, as the API might respond positively even when the underlying database connection is not functional. In production environments, this can lead to incorrect assumptions about service availability.
Proposed Solution
Enhance the /_mgmt/ping endpoint to perform an actual health check against the PostgreSQL database with PgSTAC before responding positively. The endpoint should:
- Attempt to establish a connection to the database
- Execute a simple query to verify PgSTAC tables/functions are accessible
- Return a success message only if both checks pass
- Return an appropriate error status code and message if any check fails
Benefits
- More accurate health/readiness checks in containerized/cloud environments
- Better integration with container orchestration systems like Kubernetes
- Faster detection of database connectivity issues
vprivat-ads
Metadata
Metadata
Assignees
Labels
No labels