GitHub user gfodor opened a pull request: https://github.com/apache/kafka/pull/1267
File handles are leaked on .lock files Kafka Streams seems to hold file handles on the `.lock` files for the state dirs, resulting in an explosion of filehandles over time. Running `lsof` shows the number of open filehandles on the `.lock` file increasing rapidly over time. In a separate test project, I reproduced the issue and determined that in order for the filehandle to be relinquished the `FileChannel` instance must be properly closed. Applying this patch seems to resolve the issue in my job. You can merge this pull request into a Git repository by running: $ git pull https://github.com/AltspaceVR/kafka bug/state-lock-filehandle-leak Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1267.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1267 ---- commit a694e7a9047efe106ff41be02a12c9e46cc3384f Author: Greg Fodor <gfo...@gmail.com> Date: 2016-04-25T07:05:12Z Close file channel when lock is released ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---