keda icon indicating copy to clipboard operation
keda copied to clipboard

Keda failed to fetch PubSub metrics randomly

Open chenele opened this issue 2 years ago • 4 comments

Report

Hi

We are using Keda 2.5.0 with GKE.

There is some kind of bug when using GCP PubSub with Keda, while from time to time it failed to fetch metrics from stackdriver and says the metric doesnt exist, although few minutes later all good.

anyone encounter this? any workaround? 10x

Expected Behavior

fetch metrics all the time

Actual Behavior

failed to fetch metrics randomly , but too frequent

Steps to Reproduce the Problem

Logs from KEDA operator

2022-06-12T05:45:22.762Z	ERROR	gcp_pub_sub_scaler	error getting Active Status	{"error": "could not find stackdriver metric with filter metric.type=\"pubsub.googleapis.com/subscription/num_undelivered_messages\" AND resource.labels.subscription_id=\"my-subscription\""}
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).checkScalers
	/workspace/pkg/scaling/scale_handler.go:261
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).startScaleLoop
	/workspace/pkg/scaling/scale_handler.go:146

KEDA Version

2.5.0

Kubernetes Version

1.21

Platform

Google Cloud

Scaler Details

PubSub

Anything else?

No response

chenele avatar Jun 12 '22 09:06 chenele

hey @chenele There were problems related with the internal cache in KEDA v2.5, please update it to at least v2.6.1 (or to latest v2.7.1) let me know if the problem persists after updating KEDA

JorTurFer avatar Jun 12 '22 14:06 JorTurFer

yeah, go straight to 2.7.1, there were also some improvements in GCP scalers.

zroubalik avatar Jun 13 '22 08:06 zroubalik

Cool, 10x. we will update to 2.7.1 and see if this issue remains.

chenele avatar Jun 14 '22 10:06 chenele

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 17:08 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 12 '22 22:10 stale[bot]

This issue has been automatically closed due to inactivity.

stale[bot] avatar Oct 19 '22 23:10 stale[bot]

Hi @zroubalik , we are running keda 2.7.1 version and using the stack driver scaler to pull load-balancer metrics for scaling applications, we are still getting intermediate errors for fetching metrics

1 logr.go:279] keda_metrics_adapter/gcp_stackdriver_scaler "msg"="error getting metric value" "error"="could not find stackdriver metric with filter metric.type=\"loadbalancing.googleapis.com/https/backend_request_count\" AND resource.type=\"https_lb_rule\" AND resource.label.backend_target_name=\"<application_name>\""  ```

prakharjoshi avatar Nov 30 '22 08:11 prakharjoshi

Could you open a new issue to track this please @prakharjoshi ?

JorTurFer avatar Nov 30 '22 08:11 JorTurFer

@JorTurFer Created a new issue for your reference https://github.com/kedacore/keda/issues/3937

prakharjoshi avatar Nov 30 '22 08:11 prakharjoshi