-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
MySQL connections not closed #1636
Comments
I think this one is my bad. The scalers are not being closed after validating the names. @zroubalik What do you think? keda/controllers/scaledobject_controller.go Line 255 in aac70e6
|
@ycabrer yeah, seems like this is the root of the problem. I am glad we have (hopefully) found the problem quickly :) |
@ycabrer @zroubalik We observed the same issue this night with a Postgres database and KEDA version 2.1.0. When we will have the fix available in a new KEDA version? |
@dan-leanix we will discuss 2.2 release on a call next Tuesday, if everything is fine, we will release that week 🤞 |
@zroubalik Thanks! |
@mlushpenko This merged PR should fix this issue: #1640 Previously there was a code, which initialized scalers but didn't close the connections, now the code is being moved to a location where the connections are closed. |
Thanks a lot for your answer, I've deleted one of my comments after re-reading the code, but an extra explanation is always useful. Very eager for the fix - the last obstacle before deploying keda to our production clusters. |
@mlushpenko Glad to hear that! |
@zroubalik Any news if 2.2 gets released this week? |
@dan-leanix if everything will be fine, we are going to release on Thursday 🤞 😄 |
@zroubalik thanks for releasing, was running it over the weekend and connections seem stable. |
@mlushpenko glad to hear that! Thanks for the feedback, closing this issue. |
Report
While experimenting with Keda ScaledObject using a MySQL trigger, we notice the number of connections to our MySQL database increasing indefintely. In an autoscaling cluster (AWS RDS Aurora) at some point we had 15 x ~600 connections. This was using Keda v2.0.0
Upgrading to Keda v2.1.0, hoping that #1416 would fix it, shows a slower ramp-up of connections, but the problem still exists.
Findings:
ScaledObject
stops the ramp-up.DB Engine: 5.6.mysql_aurora.1.22.2
This is probably related to #1121
Please let me know if I can help out by providing additional info or run variations of the above tests.
Expected Behavior
A more or less constant number of connections to the MySQL database.
Actual Behavior
Number of connections continuously rising to the point where DB refuses new connections. Connections only closed after restarting Keda operator and metrics-apiserver.
Steps to Reproduce the Problem
ScaledObject
similar to the one belowPart of the
ScaledObject
(slightly redacted):Logs from KEDA operator
Repeating pattern. Nothing directly standing out.
KEDA Version
2.1.0
Kubernetes Version
1.16
Platform
Amazon Web Services
Scaler Details
mysql
DB connections (drop is after restarting Keda components):
The text was updated successfully, but these errors were encountered: