dazzling-napkin-4938
07/07/2023, 1:37 AM/health/ready
endpoint is supposed to be checking the database connection status, at least according to the docs. I’m currently watching a self hosted Kratos return 500 errors for every request, with the logs saying:
An error occurred while handling a request audience=application error=map[message:unable to fetch records: failed to connect to DATABASEHowever,
/health/ready
is still returning:
{
"status": "ok"
}
Is there something I’m missing here? It seems like Kratos health status isn’t actually doing a check on database connectivity. There’s also /health/alive
, which again according to the docs just checks that Kratos is responsive to requests. We really need Kratos to return a health error if it can’t connect to the database.dazzling-napkin-4938
07/07/2023, 2:57 AMPing()
from the database package
• The underlying Ping() for postgres just attempts to connect and send an empty query, essentially just checking any connectivity is present
I wonder whether Kratos should be doing health check with something more specific, eg at least trying to query something on Kratos’ database, not just connection to the server?