DependencyTrack / DependencyTrack/dependency-track

External PostgreSQL CPU 100% for 7+ hours after initial setup

Open
#3,430 1 comment 0 reactions 0 assignees View on GitHub
defect pending more information performance
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

In GCP Cloud SQL this is the state of the DB from initial setup

image

I have 1 CPU and it's constantly 100%

Its doing a lot of transactions as well.

Logs are similar to the following:

```
SELECT "A0"."CPE22","A0"."CPE23","A0"."EDITION","A0"."LANGUAGE","A0"."OTHER","A0"."PART","A0"."PRODUCT","A0"."PURL","A0"."PURL_NAME","A0"."PURL_NAMESPACE","A0"."PURL_QUALIFIERS","A0"."PURL_SUBPATH","A0"."PURL_TYPE","A0"."PURL_VERSION","A0"."SWEDITION","A0"."TARGETHW","A0"."TARGETSW","A0"."UPDATE","A0"."UUID","A0"."VENDOR","A0"."VERSION","A0"."VERSIONENDEXCLUDING","A0"."VERSIONENDINCLUDING","A0"."VERSIONSTARTEXCLUDING","A0"."VERSIONSTARTINCLUDING","A0"."VULNERABLE" FROM "VULNERABLESOFTWARE" "A0" WHERE "A0"."ID" = $1
```

```
bind : SHOW TRANSACTION ISOLATION LEVEL
```

### Steps to Reproduce

1. Use latest apiserver image
2. Create Cloud SQL postgreSQL 14 instance
3. Run apiserver
4. DB goes boom

### Expected Behavior

If any initial setup is required, it should not be done in hundreds of thousands of transactions

### Dependency-Track Version

4.10.1

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

14.9

### Browser

Google Chrome

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.