-
Notifications
You must be signed in to change notification settings - Fork 179
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
Suspected memory leak in KafkaThrottledLatestProcessedCommit #2623
Comments
We would need to see the application. There is a poison pill mechanism that makes sure we do not accumulate too much. So make sure your messages are acknowledged. |
Yes, probably your messages are not acknowledged properly, so not cleared from tracked messages. |
@cescoffier @ozangunalp Thanks for the suggestion. As I understand if it was due to messages are not being acknowledged properly it would result in TooManyMessagesWithoutAckException. However, In our case we don't see this issue and we see uninterrupted records consumption. From heap analysis only the processedOffsets field was leaking. |
Aren't these methods getting called from event loops ? |
@cescoffier Thanks for clarification. Yes they are. Now I am not sure where is the issue. Will try to come up with a test case. |
If you've specific logs linked to this issue it can be handy. Otherwise, I don't see why this might happen. |
@ozangunalp maybe if |
I've thought of that, but with |
Yeah, that's what I just saw. |
I think issue is that with IncomingKafkaRecordBatch only latestOffsetRecords of that batch are stored in OffsetStore.receivedOffsets and subsequently removed from processedOffsets. But processedOffsets will have all Offsets not just the latestOffsetRecords. |
I'll verify batch consuming for leaks. Are you acking individual messages and not the batch as a whole? |
@ozangunalp Yes acking individual messages |
I didn't have time to reproduce this but acking individual messages in batch mode should be the reason for Offset tracking not getting cleaned |
I have observed that our heap slowly increasing with KafkaThrottledLatestProcessedCommit
Here is the heap map
Any inputs are greatly appreciated
The text was updated successfully, but these errors were encountered: