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

Memory Leak when using toHotStream #1532

Closed
T1m1 opened this issue Mar 1, 2024 · 4 comments
Closed

Memory Leak when using toHotStream #1532

T1m1 opened this issue Mar 1, 2024 · 4 comments

Comments

@T1m1
Copy link

T1m1 commented Mar 1, 2024

Context

In our Quarkus application, we utilize the Multi.toHotStream() method on a Kafka topic that continuously publishes a large volume of data. During our load and performance testing, we observed that an ArrayList fills up with instances of BroadcastProcessor, and the references of these instances are never released. This leads to the application crashing.

It appears to be a similar issue to #1482, but in the BroadcastProcessor class. Perhaps instances that are no longer needed need to be removed from the subscribers list once the subscription has been fully processed (via onComplete or onError).

Additional details

Quarkus version: 3.7.4
Mutiny version: 2.5.7

@jponge
Copy link
Member

jponge commented Mar 1, 2024

Would you have a pure-Mutiny (no Kafka) reproducer that exhibits a pipeline causing a memory leak?

@jponge
Copy link
Member

jponge commented Mar 4, 2024

@T1m1 I have limited options to test a fix for this, can you try a local 999-SNAPSHOT build of Mutiny based on this branch? #1536

@jponge
Copy link
Member

jponge commented Mar 4, 2024

@T1m1 Also the current main branch of Mutiny needs tiny fixes for Quarkus and Reactive Messaging, you may check by cherry-picking the commit on top of https://github.com/smallrye/smallrye-mutiny/tree/2.5.x

@jponge
Copy link
Member

jponge commented Mar 6, 2024

I assume #1536 is a good fix and will proceed with merging + backporting

@jponge jponge closed this as completed Mar 6, 2024
jponge added a commit to jponge/smallrye-mutiny that referenced this issue Mar 6, 2024
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

No branches or pull requests

2 participants