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

Bug: Elevated postgres CPU utilization after enabling USE_ARTIFACT_LISTING_API_V2 #4373

Closed
2 tasks done
ajaydevtron opened this issue Dec 8, 2023 · 0 comments · Fixed by #4375
Closed
2 tasks done
Assignees
Labels
bug Something isn't working pager-duty Bugs / Issues found while on pager duty

Comments

@ajaydevtron
Copy link
Contributor

ajaydevtron commented Dec 8, 2023

📜 Description

he PostgreSQL CPU utilization has reached 100% (4 cores) after enabling the USE_ARTIFACT_LISTING_API_V2 flag in the orchestrator configmap.

ss67

Top SQL after debugging the utilisation .

SELECT DISTINCT(ci_artifact.id) , (SELECT COUNT(DISTINCT ci_artifact.id) as total_count from ci_artifact LEFT JOIN cd_workflow ON ci_artifact.id = cd_workflow.ci_artifact_id LEFT JOIN cd_workflow_runner ON cd_workflow_runner.cd_workflow_id=cd_workflow.id Where (((cd_workflow_runner.id in (select MAX(cd_workflow_runner.id) OVER (PARTITION BY cd_workflow.ci_artifact_id) FROM cd_workflow_runner inner join cd_workflow on cd_workflow.id=cd_workflow_runner.cd_workflow_id)) AND ((cd_workflow.pipeline

Currently, we have disabled it from the configmap.

PS:- We are observing inconsistent status when searching for the same image using the its tag, the copy container image plugin, is not working as expected and fetch more Image functionality is also affected.

👟 Reproduction steps

  1. Enabled USE_ARTIFACT_LISTING_API_V2
  2. Try to click on select image for pipeline.

👍 Expected behavior

We shouldn’t spike on postgres cpu utilization.

👎 Actual Behavior

Cpu utilisation should be normal.

☸ Kubernetes version

1.23

Cloud provider

AWS

🌍 Browser

Chrome

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

AB#7348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pager-duty Bugs / Issues found while on pager duty
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants