-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more debugging scenarios for not scaling as expected #1298
Open
OfficiallySomeGuy
wants to merge
1
commit into
kedacore:main
Choose a base branch
from
OfficiallySomeGuy:update-scaling-debugging-scenarios
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,36 @@ | ||
+++ | ||
title = "Why is my `ScaledObject` paused?" | ||
title = "Why is my `ScaledObject` not scaling as expected?" | ||
weight = 1 | ||
+++ | ||
|
||
When KEDA has upstream errors to get scaler source information it will keep the current instance count of the workload unless the `fallback` section is defined. | ||
There are a number of reasons why your KEDA scaling may not be working as expected, | ||
|
||
This behavior might feel like the autoscaling is not happening, but in reality, it is because of problems related to the scaler source. | ||
## Common issues | ||
|
||
You can check if this is your case by reviewing the logs from the KEDA pods where you should see errors in both our Operator and Metrics server. You can also check a status of the ScaledObject (`READY` and `ACTIVE` condition) by running following command: | ||
### KEDA scaler source is invalid | ||
|
||
When KEDA has upstream errors to get scaler source information it will keep the current instance count of the workload unless the `fallback` section is defined. This behavior might feel like the autoscaling is not happening, but in reality, it is because of problems related to the scaler source. | ||
|
||
### DesiredReplicas is within 10% of the target value | ||
|
||
If the replica mismatch is within 10% of the target value, you may be experiencing a known issue whereby Kubernetes `HorizontalPodAutoscalers` have a default tolerance of 10%. If your desired value is within 10% of the scaling metric, the HPA will not scale. More detail on this scenario can be found in [this issue against the KEDA project](https://github.com/kedacore/keda/issues/5263) and [this issue against the Kubernetes project](https://github.com/kubernetes/kubernetes/issues/116984). | ||
|
||
## Debugging process | ||
|
||
### Check KEDA pods for errors | ||
|
||
The most effective place to start for debugging your issue is by reviewing the logs from the KEDA pods where you may see errors in both our Operator and Metrics server. You can [enable debug logging](https://github.com/kedacore/keda/blob/main/BUILD.md#setting-log-levels) to provide more verbose output, which may be helpful in some scenarios. | ||
|
||
### Check the Kubernetes resources for errors | ||
|
||
You can check the status of the `ScaledObject` (`READY` and `ACTIVE` condition) by running following command: | ||
|
||
```bash | ||
$ kubectl get scaledobject MY-SCALED-OBJECT | ||
``` | ||
|
||
It is also possible to check the status conditions on the related HPA itself to determine whether the HPA is also healthy: | ||
|
||
```bash | ||
$ kubectl get horizontalpodautoscaler MY-HPA | ||
``` |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would prefer a seperate item for this; people using pausing will more likely be helped faster if we have a dedicated item.
You can still refer to the new item from within the paused entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree a separate section would be great