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

Finding API crashing when is expected to return a very large amount of data #4730

Open
2 tasks done
mcmwhfy opened this issue Mar 7, 2025 · 5 comments
Open
2 tasks done
Labels
defect Something isn't working in triage

Comments

@mcmwhfy
Copy link

mcmwhfy commented Mar 7, 2025

Current Behavior

Hi Steve, I am using finding api: "/api/v1/finding?severity=critical,high&pageSize=23029&pageNumber=1" to collect all findings for a lot of repositories, I am filtering with only the data that I need but the api is not returning a such amount of large data, is that a known issue or should I take another approach ?

Steps to Reproduce

Call the finding api with a json that have a huge amount of findings

Expected Behavior

The api will crash due to large size

Dependency-Track Version

4.12.6

Dependency-Track Distribution

Executable WAR, Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

@mcmwhfy mcmwhfy added defect Something isn't working in triage labels Mar 7, 2025
@stohrendorf
Copy link
Contributor

That's a very old version you're using - I highly recommend updating, since (which is relevant for your case) there were some improvements for retrieving the findings in 4.12.

@mcmwhfy
Copy link
Author

mcmwhfy commented Mar 7, 2025

Apologize am using 4.12.6

@stohrendorf
Copy link
Contributor

Do you see anything in the server logs like stacktraces or error messages? I think there should be a stack trace. Have you tried reducing the page size?

@mcmwhfy
Copy link
Author

mcmwhfy commented Mar 8, 2025

net::ERR_FAILED 504 (Gateway Timeout), if I am modifying the pageSize parameter it is working with less than 5000 but with more than that, no

I have also tried to use this way:
const PAGE_SIZE = 500; // Adjust to reduce large response issues
const MAX_PAGES = 20; // Limit to avoid excessive requests

but the result is the same.

@stohrendorf
Copy link
Contributor

That's not an issue with DT per se, that HTTP error comes from the reverse proxy in front of it. Increasing the timeout in the reverse proxy should resolve that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working in triage
Projects
None yet
Development

No branches or pull requests

2 participants