Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When using the TailFile processor, if the Rolling Filename Pattern is set, the Processor does not appear to properly close the file handles that it creates for the directory. As a result, if the Processor runs long enough, we start to see "IOException: Too many open files", which causes a lot of problems and requires a restart of NiFi.
Performing an "lsof" while running TailFile to tail the logs in my logs directory results in 10's of thousands of entries like:
java 14549 ec2-user *703r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *704r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *705r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *706r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *707r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *708r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *709r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs
java 14549 ec2-user *710r DIR 202,1 4096 787749 /opt/nifi/nifi-0.4.2-SNAPSHOT/logs