Coder Social home page Coder Social logo

Comments (6)

JorTurFer avatar JorTurFer commented on May 29, 2024

Hello @MichaelMayer-askui ,
Thanks for reporting! Do you see any error in keda-operator logs? Could you confirm the KEDA version you are using?

from keda.

MichaelMayer-askui avatar MichaelMayer-askui commented on May 29, 2024

Hello @JorTurFer ,
The versions i can confirm, all keda components on version 2.13.1, see screeshoot.
image

The only error message from keda-operator which i receive is the following:

mongodb_scaler	failed to query DATABASE in COLLECTION_NAME, because of server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: ATLAS_URL.mongodb.net:27017, Type: RSSecondary, Tag sets: diskState=READY,availabilityZone=AZ,nodeType=ELECTABLE,provider=AWS,region=AZ,workloadType=OPERATIONAL, Average RTT: 1230992348 }, { Addr: ATLAS_URL.mongodb.net:27017, Type: RSSecondary, Tag sets: provider=AWS,diskState=READY,region=AZ,workloadType=OPERATIONAL,availabilityZone=AZ,nodeType=ELECTABLE, Average RTT: 3196250 }, { Addr: ATLAS_URL.mongodb.net:27017, Type: Unknown, Last error: dial tcp IP:27017: connect: connection refused }, ] }	{"type": "ScaledJob", "namespace": "NAMESPACE_NAME", "name": "SCALED_JOB_NAME", "error": "server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: ATLAS_URL.mongodb.net:27017, Type: RSSecondary, Tag sets: diskState=READY,availabilityZone=AZ,nodeType=ELECTABLE,provider=AWS,region=AZ,workloadType=OPERATIONAL, Average RTT: 1230992348 }, { Addr: ATLAS_URL.mongodb.net:27017, Type: RSSecondary, Tag sets: provider=AWS,diskState=READY,region=AZ,workloadType=OPERATIONAL,availabilityZone=AZ,nodeType=ELECTABLE, Average RTT: 3196250 }, { Addr: ATLAS_URL.mongodb.net:27017, Type: Unknown, Last error: dial tcp IP:27017: connect: connection refused }, ] }"}
github.com/kedacore/keda/v2/pkg/scalers.(*mongoDBScaler).getQueryResult
	/workspace/pkg/scalers/mongo_scaler.go:231
github.com/kedacore/keda/v2/pkg/scalers.(*mongoDBScaler).GetMetricsAndActivity
	/workspace/pkg/scalers/mongo_scaler.go:240
github.com/kedacore/keda/v2/pkg/scaling/cache.(*ScalersCache).GetMetricsAndActivityForScaler
	/workspace/pkg/scaling/cache/scalers_cache.go:130
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).getScaledJobMetrics
	/workspace/pkg/scaling/scale_handler.go:830
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).isScaledJobActive
	/workspace/pkg/scaling/scale_handler.go:879
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).checkScalers
	/workspace/pkg/scaling/scale_handler.go:262
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).startScaleLoop
	/workspace/pkg/scaling/scale_handler.go:182

This message occurs after the high amount of connection is open and the database refused more.

from keda.

JorTurFer avatar JorTurFer commented on May 29, 2024

Is your connection using mongo+svr scheme? v2.13.1 doesn't support it. I mean, if you are using Mongo Atlas based on mongo+srv scheme, it could be the problem itself. The support for the scheme was added 3 weeks ago: #5566

Maybe you could try the main tag setting the scheme as it's explained in next version docs: https://keda.sh/docs/2.14/scalers/mongodb/

from keda.

MichaelMayer-askui avatar MichaelMayer-askui commented on May 29, 2024

Yes the connection string is in mongo+svr scheme. I will test, if the problem will be resolved by adjusting the connection string.

Now I am surprised that it works. I used this config for now ~1 year without any issues. The problems occurred right after the update to v2.13 from v2.12.
Should this not produce an error regarding wrong configuration?

from keda.

JorTurFer avatar JorTurFer commented on May 29, 2024

Should this not produce an error regarding wrong configuration?

It could be, I don't remind related changes but they definitively could be there, for example the mongo pkg has been updated too

from keda.

stale avatar stale commented on May 29, 2024

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.

from keda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.