You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue involves using StringSerialiser/Deserialiser for key and ByteArraySerialiser/Deserialiser.
When I try to consume messages in batch, with manual acknowledgement, and pass the messages to producer to send these messages to different output topic, the producer is holding on to byte[] and not releasing the memory. It leads to OOM after the memory limit is reached.
Expected Behavior
The producer should ideally release the memory and shouldn't hold it back.
Actual Behavior
Producer somehow keeps the reference to all byte[] and hence garbage collector doesn't collect it. It leads to OOM.
Steps to Reproduce
Following code can be referenced in order to reproduce this. Run the below code with millions of messages in input topic and observe in profiler that the memory usage starts increasing and once its exhausted, the application crashes.
This issue involves using StringSerialiser/Deserialiser for key and ByteArraySerialiser/Deserialiser.
When I try to consume messages in batch, with manual acknowledgement, and pass the messages to producer to send these messages to different output topic, the producer is holding on to byte[] and not releasing the memory. It leads to OOM after the memory limit is reached.
Expected Behavior
The producer should ideally release the memory and shouldn't hold it back.
Actual Behavior
Producer somehow keeps the reference to all byte[] and hence garbage collector doesn't collect it. It leads to OOM.
Steps to Reproduce
Following code can be referenced in order to reproduce this. Run the below code with millions of messages in input topic and observe in profiler that the memory usage starts increasing and once its exhausted, the application crashes.
:: Consumer Class ::
:: Producer Class ::
Possible Solution
If we can identify what's holding the memory and not releasing it, then it can be fixed.
Your Environment
netty
, ...):java -version
): openjdk 11.0.15 2022-04-19uname -a
):Linux 34624abc07f2 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 x86_64 Toybox
For more details: https://stackoverflow.com/questions/74055236/getting-oom-while-processing-records-in-batches-with-manual-offset-acknowledgeme
The text was updated successfully, but these errors were encountered: