Support Questions

Find answers, ask questions, and share your expertise

How to prevent nifi-app logs from filling my drive.

avatar
New Member

This past weekend I had an issue and my nifi-app logs filed up my drive. I have address the issue but I am trying to find out how I can configure nifi to rotate the nifi-app files so it dose not file up my disk space again. Thank you

9 REPLIES 9

avatar

Hi @Andre Labbe

You can configure log rotation and retention in the logback configuration of NiFi. Please start by reading these ressources to get started:

avatar
New Member

Hi @Abdelkrim Hadjidj

These links were very informative. After reading these and doing some testing I think I have found what I need but it is not available in the version that I have.

The option I am looking for is totalSizeCap. If I am reading the notes correctly is available in logback 1.1.8, and I am running Nifi 1.1.1 witch uses logback 1.1.3. Would you happen to know what version of logback is used by the newest version of Nifi?

avatar

Hi @Andre Labbe

That's good news. Following NIFI-3694, it looks like logback has been updated to 1.2.3 on NiFi 1.2.

avatar

@Andre Labbe If you found that this answer addressed your question, please take a moment to click "Accept" below.

avatar
New Contributor

Did you get any feedback? How did you solved it?

avatar
New Member

We have tried to change these settings but no joy. I "ruined" the logback xml and nifi did not start. So the file is being read. However, any setting change I make does not take affect (nifi-app.log).

Stock setup should rotate the logs every hour. We have not seen this behavior. Also, I changed the <maxFileSize> to 2MB but that doesn't help either.

Anyone have the same experience? Seems odd. We are on Windows 10.

avatar
New Member

<file>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app.log</file>

Until 1.7.0 this string in logback.xml was commented. Uncomment it and it will be ok

avatar
New Member

Rats. I am using 1.7.0. It is already uncommented.

avatar
Explorer

Did anyone have fix to this issue? I am encountering it also. I am using NiFi 1.16.1. The nifi-app.log is exceeding the 100MB maxFile in the setting.