Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2785

Reuse of KafkaCheckpointManager causes memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Calling start() and stop() multiple times on the same KafkaCheckpointManager, while stopConsumerAfterFirstRead == true, causes the SystemConsumer left unclosed. The unclosed SystemConsumer can cause memory leaks in some implementations.

       

      Evidence:

      In production logs, SystemConsumer was started 1741 times, but only closed 14 times.

      [katxxxx@xxxxxx xxxx]$ grep "Starting the checkpoint SystemConsumer from oldest offset" xxxxxx.log|wc -l
      1741
      [katxxxxx@xxxxxx xxxx]$ grep "Stopping system consumer" xxxxxxxxxx.log |wc -l
      14 

      We also have a heap dump of KafkaSystemConsumer taking up 8Gbs of memory.

      Attachments

        Activity

          People

            Unassigned Unassigned
            katieliu Katie Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: