Skip to content
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

Memory increasing linearly and finally pod crashes with OOOM #116

Closed
cerberus20 opened this issue Nov 27, 2022 · 10 comments
Closed

Memory increasing linearly and finally pod crashes with OOOM #116

cerberus20 opened this issue Nov 27, 2022 · 10 comments

Comments

@cerberus20
Copy link

cerberus20 commented Nov 27, 2022

image

I tried configuring 2GB, than 4GB and finally 16GB of memory for controller pod but pod memory keeps increasing.
Cores allocated to container: 2

I am performance testing the controller with 100 concurrent up and downscale jobs for 100 different deployments.

apiVersion: autoscaling.alibabacloud.com/v1beta1 kind: CronHorizontalPodAutoscaler metadata: name: cronhpa-1 namespace: test spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: deployment-1 jobs: - name: "scale-down" schedule: "* */9 * * * *" targetSize: 1 - name: "scale-up" schedule: "* */7 * * * *" targetSize: 2

Can you please guide what may be the issue behind this? Thank you

@cerberus20
Copy link
Author

cerberus20 commented Nov 30, 2022

@ringtail Would you be able to help here please? Looks like there is some memory leak happening. I changed the schedule to 100 jobs per minute every 9th and 7th minute, but still memory keeps increasing. Thank you.

@ringtail
Copy link
Member

ringtail commented Dec 2, 2022

100 CronHPA Jobs and 2 times changes in one minute?

@cerberus20
Copy link
Author

cerberus20 commented Dec 2, 2022

@ringtail I mean I had changed the 100 scale down jobs to 0 */9 * * * * and 100 scale up jobs to 0 */7 * * * * schedule, but still memory keeps increasing.

@cerberus20
Copy link
Author

This is the 1 of 100 cronhpa objects:

apiVersion: autoscaling.alibabacloud.com/v1beta1
kind: CronHorizontalPodAutoscaler
metadata:
  name: cronhpa-99
  namespace: test
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: deployment-99
  jobs:
    - name: "scale-down"
      schedule: "0 */9 * * * *"
      targetSize: 1
    - name: "scale-up"
      schedule: "0 */7 * * * *"
      targetSize: 2```


@IrisIris
Copy link
Collaborator

IrisIris commented Dec 5, 2022

@cerberus20 I guess the picture shows the memory consumption of CronHPA controller, right? CronHPA jobs are configured to execute in minutes,but the cycle time in the picture is in "day"?

@cerberus20
Copy link
Author

cerberus20 commented Dec 5, 2022

@IrisIris Yes, the memory consumption is for CronHPA controller. Yeah, that picture is for the case when I had configured 100 cronhpa objects of:

apiVersion: autoscaling.alibabacloud.com/v1beta1
kind: CronHorizontalPodAutoscaler
metadata:
  name: cronhpa-{0..99}
  namespace: test
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: deployment-{0..99}
  jobs:
    - name: "scale-down"
      schedule: "* */9 * * * *"
      targetSize: 1
    - name: "scale-up"
      schedule: "* */7 * * * *"
      targetSize: 2

But even with reduced frequency jobs mentioned in last comment, memory keeps increasing but with slower rate than what is shown in picture.

Cycle is 1 day because I had configured 16 GB memory limit and controller container used to hit the limit in ~1 day.

@ringtail
Copy link
Member

@IrisIris Does latest version still have the same problem.

@cerberus20 cerberus20 mentioned this issue Feb 27, 2023
@cerberus20
Copy link
Author

I am not sure if #124 is the fix or not for the above issue, but changes with this PR as well still face the issue. cc: @ringtail @IrisIris

image

@ringtail
Copy link
Member

@cerberus20 Have you try the latest version?

@cerberus20
Copy link
Author

@ringtail Yes, I am generating controller binary from latest state of master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants