Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

NiFi 1.13.2 logs config not working

New Contributor

NiFi 1.13.2
OpenJDK 1.8.0_292 (64-bit)



<appender name="APP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
              For daily rollover, use 'app_%d.log'.
              For hourly rollover, use 'app_%d{yyyy-MM-dd_HH}.log'.
              To GZIP rolled files, replace '.log' with '.log.gz'.
              To ZIP rolled files, replace '.log' with ''.
            <!-- keep 30 log files worth of history -->
            <!-- archive removal will be executed on appender start up -->
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>



From what I understand from the config, logs will have 30hours of history and 50GB overall size. But the logs we had and experience more than once already, was 200GB of logs. This causes the system to crash.

Please help how to properly configure nifi to limit the log size and I've tried to do it by myself with no luck.


Thank you!


Super Mentor


It would be interesting to see a verbose listing of your NiFi  logs directory once it has well exceeded 50 GB archived log files.

What you have configured will retain 30 hours of log data.  With each of those 30 hours you may have 1 or more incremental log files (each at 100 MB except for last one each hour).

On NiFi restart do you see that the following is cleaning up the archive directory of files older than 30 hours:


I would be inspecting the nifi-app.log to see if you encounter any exceptions around logback or if you see any OutOfMemory (OOM) or no more files (file limits) exceptions that may explain the behavior.

Hope this helps,