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

Update in_kafka_group.rb to fix the memory leak. #507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srikanthbirada
Copy link

In kafka group plugin is leaking memory incase of kafka is not reachable and disable retry limit is true.

In kafka group plugin is leaking memory incase of kafka is not reachable and disable retry limit is true.
Copy link

This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days

@github-actions github-actions bot added the stale label Jul 30, 2024
@ashie ashie removed the stale label Jul 30, 2024
@ashie ashie self-requested a review July 30, 2024 12:27
Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my late response.

Could you please address following 2 points?

@@ -254,6 +255,9 @@ def reconnect_consumer
log.error "unexpected error during re-starting consumer object access", :error => e.to_s
log.error_backtrace
if @retry_count <= @retry_limit or disable_retry_limit
# Adding the following line to ensure, consumer object is cleaned before recursively calling reconnect_consumer.
# This ensures no memory leak.
consumer = nil
reconnect_consumer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably just calling retry here is better than resetting consumer and calling reconnect_consumer recursively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants