The healtcheck endpoint should check that the database is accessible. If the db is inaccessible, the service is definitively not healthy.
Description
Add another check (in addition to the ES check) for the database connectivity. Calling django.db.connection.ensure_connection() should be sufficient. It raises an error when the database connection is unavailable.
Problem
The healtcheck endpoint should check that the database is accessible. If the db is inaccessible, the service is definitively not healthy.
Description
Add another check (in addition to the ES check) for the database connectivity. Calling
django.db.connection.ensure_connection()
should be sufficient. It raises an error when the database connection is unavailable.Alternatives
Additional context