{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/1563","repository_url":"https://api.github.com/repos/apache/kafka","labels_url":"https://api.github.com/repos/apache/kafka/issues/1563/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1563/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/1563/events","html_url":"https://github.com/apache/kafka/pull/1563","id":162605976,"number":1563,"title":"KAFKA-3904: File descriptor leaking (Too many open files) for long ru…","user":{"login":"HenryCaiHaiying","id":7378943,"avatar_url":"https://avatars.githubusercontent.com/u/7378943?v=3","gravatar_id":"","url":"https://api.github.com/users/HenryCaiHaiying","html_url":"https://github.com/HenryCaiHaiying","followers_url":"https://api.github.com/users/HenryCaiHaiying/followers","following_url":"https://api.github.com/users/HenryCaiHaiying/following{/other_user}","gists_url":"https://api.github.com/users/HenryCaiHaiying/gists{/gist_id}","starred_url":"https://api.github.com/users/HenryCaiHaiying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenryCaiHaiying/subscriptions","organizations_url":"https://api.github.com/users/HenryCaiHaiying/orgs","repos_url":"https://api.github.com/users/HenryCaiHaiying/repos","events_url":"https://api.github.com/users/HenryCaiHaiying/events{/privacy}","received_events_url":"https://api.github.com/users/HenryCaiHaiying/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-28T05:34:34Z","updated_at":"2016-06-28T08:35:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1563","html_url":"https://github.com/apache/kafka/pull/1563","diff_url":"https://github.com/apache/kafka/pull/1563.diff","patch_url":"https://github.com/apache/kafka/pull/1563.patch"},"body":"…nning stream process\r\n\r\nI noticed when my application was running for more than one day, I will get 'Too many open files' error.\r\n\r\nI used 'lsof' to list all the file descriptors used by the process, it's over 32K, but most of them belongs to the .lock file, e.g. a single lock file shows 2700 times.\r\n\r\nI looked at the code, I think the problem is in:\r\n    FileChannel channel = new RandomAccessFile(lockFile, \"rw\").getChannel();\r\nEach time new RandomAccessFile is called, a new fd will be created.\r\n\r\nFix this by caching the FileChannels we created so far."},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/228986780","html_url":"https://github.com/apache/kafka/pull/1563#issuecomment-228986780","issue_url":"https://api.github.com/repos/apache/kafka/issues/1563","id":228986780,"user":{"login":"enothereska","id":14234336,"avatar_url":"https://avatars.githubusercontent.com/u/14234336?v=3","gravatar_id":"","url":"https://api.github.com/users/enothereska","html_url":"https://github.com/enothereska","followers_url":"https://api.github.com/users/enothereska/followers","following_url":"https://api.github.com/users/enothereska/following{/other_user}","gists_url":"https://api.github.com/users/enothereska/gists{/gist_id}","starred_url":"https://api.github.com/users/enothereska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enothereska/subscriptions","organizations_url":"https://api.github.com/users/enothereska/orgs","repos_url":"https://api.github.com/users/enothereska/repos","events_url":"https://api.github.com/users/enothereska/events{/privacy}","received_events_url":"https://api.github.com/users/enothereska/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T08:35:37Z","updated_at":"2016-06-28T08:35:37Z","body":"LGTM, alternatively you can use FileChannel.open as @ijuma suggests."}}
{"actor":{"display_login":"enothereska"}}