Is there a way to get process to exit on DB connection errors when rotating database passwords? #4179
-
Hi, we're setting up automatic database password rotation and running into an edge case where the container and the database might not always be in sync with a valid password. Unfortunately it looks like the server will simply log an error ("Authentication failed against database server at...") instead of exiting the process which would then allow Kubernetes to restart the container and solve the issue (in a subset of the edge cases). Is there a way to get the server to "crash", i.e. exit the process on fatal database connection errors? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
The Langfuse server does have a mechanism to exit the process on fatal errors using the |
Beta Was this translation helpful? Give feedback.
-
Yes, use the health check, which should fail if the database is unavailable (for example, when the database password changes). This will allow you to terminate the pods that still have the old credentials. For more information, visit: https://langfuse.com/docs/deployment/self-host#health-and-readiness-check-endpoint |
Beta Was this translation helpful? Give feedback.
-
Hmm, I wonder if I've run into a bug then? The both health checks are returning:
This is for a pod that still has the old credentials, and is failing SSO with the following errors:
And then also for tracing:
|
Beta Was this translation helpful? Give feedback.
Yes, use the health check, which should fail if the database is unavailable (for example, when the database password changes). This will allow you to terminate the pods that still have the old credentials.
For more information, visit: https://langfuse.com/docs/deployment/self-host#health-and-readiness-check-endpoint