fasten-project / vulnerability-producer

Gathers, enriches and publishes vulnerability information to a Kafka topic.
https://www.fasten-project.eu/
Apache License 2.0
6 stars 3 forks source link

High memory consumption after running for several weeks #127

Closed mir-am closed 2 years ago

mir-am commented 2 years ago

In production, I have observed that the vulnerability producer has a high memory consumption after running for ~24 days. Here is the kubectl top output:

NAME                                            CPU(cores)   MEMORY(bytes)   
fasten-vulnerability-producer-96bcc4c59-f2chr   5m           23641Mi   

As can be seen, it's over 23 GB, which is pretty high for the vulnerability producer.

proksch commented 2 years ago

I am wondering where this is coming from. As a first step, please make sure that the JVM max-memory setting has a reasonable size, it could be MUCH lower, even 4GB should be plenty from my understanding of what the producer is doing...

mir-am commented 2 years ago

I have set the memory limit to 4GB in K8s now for the vuln. producer's deployment. It should be fine now. Also, I have profiled the memory usage of the vuln. producer using VisualVM and after several update iterations, I have not observed any obvious memory leak pattern.