nifi堆空间问题

xe55xuns  于 2021-07-12  发布在  Java
关注(0)|答案(1)|浏览(543)

每当我重新启动nifi应用程序时,nifi1.11.4就会遇到堆空间内存问题。首字母 bootstrap.conf was Xms4g to Xmx8g 重启后,我们得到了java堆空间的问题,所以我们已经增加到12gb,它工作得很好。再重新启动一次后(5天内),它不接受12gb作为最大大小,我们已将其更改为14GB,然后只有nifi启动。有人能解释一下为什么nifi每次重启都需要更多的内存吗。

ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3236)
        at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
        at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
        at com.sun.org.apache.xml.internal.serializer.WriterToUTF8Buffered.flushBuffer(WriterToUTF8Buffered.java:450)
        at com.sun.org.apache.xml.internal.serializer.WriterToUTF8Buffered.write(WriterToUTF8Buffered.java:194)
        at com.sun.org.apache.xml.internal.serializer.ToStream.characters(ToStream.java:1487)
        at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(ToUnknownStream.java:814)
        at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.characters(ToUnknownStream.java:348)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:242)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:228)
        at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:92)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:684)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:728)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
        at org.apache.nifi.controller.TemplateUtils.parseDto(TemplateUtils.java:63)
        at org.apache.nifi.controller.StandardFlowSynchronizer.addLocalTemplates(StandardFlowSynchronizer.java:602)
        at org.apache.nifi.controller.StandardFlowSynchronizer.sync(StandardFlowSynchronizer.java:410)
        at org.apache.nifi.controller.FlowController.synchronize(FlowController.java:1376)
        at org.apache.nifi.persistence.StandardXMLFlowConfigurationDAO.load(StandardXMLFlowConfigurationDAO.java:88)
        at org.apache.nifi.controller.StandardFlowService.loadFromBytes(StandardFlowService.java:812)
2021-04-15 05:04:49,699 INFO [Write-Ahead Local State Provider Maintenance] org.wali.MinimalLockingWriteAheadLog org.wali.MinimalLockingWriteAheadLog@5a6f1342 checkpointed with 14464 Records and 0 Swap Files in 24 milliseconds (Stop-the-world time = 3 milliseconds, Clear Edit Logs time = 1 millis), max Transaction ID 63815
63lcw9qa

63lcw9qa1#

看起来你改变了不同的参数。

xms4g

实际上是启动内存配置。而 xmx8g 是允许的最大值。
您应该尝试将两者都设置为8g(如果这是建议您的系统使用的设置)。谢谢

相关问题