Support Questions

Find answers, ask questions, and share your expertise

JVM memory settings - Bootstrap.conf reset config

avatar
Contributor

Hi,

I downloaded HDF 3.1 and i get NIFI java.lang.OutOfMemoryError: Java heap space after running my custom processor,

I changed the default JVM memory in Bootstrap.conf from -Xms512m -Xmx512m to -Xms1g -Xmx1g and i restarted NiFi to take the new values but when i check Bootstrap.conf after restarting NiFi it reset the values to -Xms512m -Xmx512m. why it reset the values to the old values and it didn't take the new values.

Your help is highly appreciated.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@yazeed salem

If you will make changed in the script/conf files manually then upon every restart of Nifi (via Ambari UI/API call) the content of the file will be overwritten.

So can check the template here and should make changes from Ambari UI like.

Ambari UI --> Nifi --> Configs --> Advanced --> "Advanced nifi-bootstrap-env" --> "Template for bootstrap.conf"

.

Try changing the template snippet as following:

From:

# JVM memory settings
java.arg.2=-Xms{{nifi_initial_mem}}
java.arg.3=-Xmx{{nifi_max_mem}}

To

# JVM memory settings
java.arg.2=-Xms1G
java.arg.3=-Xmx1G

.

Then restart NiFi

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@yazeed salem

If you will make changed in the script/conf files manually then upon every restart of Nifi (via Ambari UI/API call) the content of the file will be overwritten.

So can check the template here and should make changes from Ambari UI like.

Ambari UI --> Nifi --> Configs --> Advanced --> "Advanced nifi-bootstrap-env" --> "Template for bootstrap.conf"

.

Try changing the template snippet as following:

From:

# JVM memory settings
java.arg.2=-Xms{{nifi_initial_mem}}
java.arg.3=-Xmx{{nifi_max_mem}}

To

# JVM memory settings
java.arg.2=-Xms1G
java.arg.3=-Xmx1G

.

Then restart NiFi

avatar
Contributor

Excellent. it works.

Thanks Mr. Jay