chore(liveness): fail liveness if db conns saturated for 10min #2648
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description & motivation
Pods are placed in an unready state if the database connections are saturated for >20 seconds.
We currently have a situation where there are some long-running database queries. These cause the database connections available to a pod to be saturated for extended periods of time. This in turn causes the pod to be in an unready state. Over time, as the long-running queries accumulate, the number of pods which are unready increases. This eventually causes the entire cluster to be unavailable.
Currently the only way to recover is to restart the pod.
Including a check of saturated database connections in the liveness probe is a short-term hack to ensure affected pods are restarted whenever the encounter this issue.
Changes:
To-do before merge:
Screenshots:
Validation of changes:
Checklist:
References