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

vulnz mirror - not working reliably - improve memory and prformance #258

Closed
EugenMayer opened this issue Jan 27, 2025 · 2 comments · Fixed by #259
Closed

vulnz mirror - not working reliably - improve memory and prformance #258

EugenMayer opened this issue Jan 27, 2025 · 2 comments · Fixed by #259

Comments

@EugenMayer
Copy link
Contributor

I'am not here to rant or vent, just wanted to express that i'am fairly frustrated with the reliability of vulnz as a mirror. It runs OOM with 7G, demanding more and more each time the NVD database grows (#253)

This is not as surprising considering that we hold the entire data we fetch as long as we fetch - in the memory. It makes the entire thing for more critical, since fetching is not a tasks of seconds, but rather hours.For me, fetching takes more than 1 hour (cannot even tell how long .. since it no longer finishes), and during the entire time, we fetch json data and stuff it into memory. Only one single thing and we repeat from scratch.

It is thus not of a surprise that in the end, the app becomes more and more memory hungry, since the NVD database is growing.

@jeremylong I know that I already asked, but could you explain, in more detail, why holding the entire data in memory is so important? Please elaborate on the transformations or aggregations needed (grouping by date?) and if so, why we could not just simply put every result in one file and have the aggregation done as the last step. This way we have

  • partial results to continue from is something fails
  • a lot less memory usage

Thanks for considering and sharing details

@EugenMayer
Copy link
Contributor Author

i will prepare a PR to fix this today

@EugenMayer EugenMayer changed the title vulnz mirror - not working reliably vulnz mirror - not working reliably - improve memory and prformance Jan 27, 2025
@EugenMayer
Copy link
Contributor Author

EugenMayer commented Jan 27, 2025

see #259

The PR copes with memory, performance and resilience.

jeremylong added a commit that referenced this issue Feb 10, 2025
* Reimplement caching to use a per-year scope
* Add forgiveness if a year fails, continue to the next one
* Reimplement how the lastUpdated date is used and stored per year
* Add lockfile
* fix: preserve modified entries if year fails
* polish docs, add exit code

---------

Co-authored-by: Jeremy Long <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant