{"action":"created","issue":{"url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23","labels_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/comments","events_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23/events","html_url":"https://github.com/ntent-ad/kafka4net/issues/23","id":119777633,"number":23,"title":"Memory leak ","user":{"login":"avoxm","id":10351071,"avatar_url":"https://avatars.githubusercontent.com/u/10351071?v=3","gravatar_id":"","url":"https://api.github.com/users/avoxm","html_url":"https://github.com/avoxm","followers_url":"https://api.github.com/users/avoxm/followers","following_url":"https://api.github.com/users/avoxm/following{/other_user}","gists_url":"https://api.github.com/users/avoxm/gists{/gist_id}","starred_url":"https://api.github.com/users/avoxm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avoxm/subscriptions","organizations_url":"https://api.github.com/users/avoxm/orgs","repos_url":"https://api.github.com/users/avoxm/repos","events_url":"https://api.github.com/users/avoxm/events{/privacy}","received_events_url":"https://api.github.com/users/avoxm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-01T18:23:18Z","updated_at":"2015-12-01T21:17:49Z","closed_at":null,"body":"It looks like there is a memory leak. \r\nThe issue is that after sending a big chunk of data kafka4net still keeps a reference to some data that keeps memory from being collected.\r\n\r\nThis is quite easy to reproduce \r\n1. Bulk Send (1 mln probably)\r\n2. Wait till everything is sent\r\n3. Close connection\r\n4. Run GC \r\n5. You will notice that kafka4net still keeps a reference to big amount of memory.\r\n\r\nYou can also run a memory profiler to get more idea."},"comment":{"url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/comments/161098524","html_url":"https://github.com/ntent-ad/kafka4net/issues/23#issuecomment-161098524","issue_url":"https://api.github.com/repos/ntent-ad/kafka4net/issues/23","id":161098524,"user":{"login":"avoxm","id":10351071,"avatar_url":"https://avatars.githubusercontent.com/u/10351071?v=3","gravatar_id":"","url":"https://api.github.com/users/avoxm","html_url":"https://github.com/avoxm","followers_url":"https://api.github.com/users/avoxm/followers","following_url":"https://api.github.com/users/avoxm/following{/other_user}","gists_url":"https://api.github.com/users/avoxm/gists{/gist_id}","starred_url":"https://api.github.com/users/avoxm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avoxm/subscriptions","organizations_url":"https://api.github.com/users/avoxm/orgs","repos_url":"https://api.github.com/users/avoxm/repos","events_url":"https://api.github.com/users/avoxm/events{/privacy}","received_events_url":"https://api.github.com/users/avoxm/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T21:17:49Z","updated_at":"2015-12-01T21:17:49Z","body":"Yes for the first question. Batches are being processed in synchronously. Next batch will be processed only after await CloseAsync. \r\nThe fact that buffer needs to grow is fine the problem is that it is not being cleaned up after producer is closed.\r\n"}}