Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This error java.lang.OutOfMemoryError: Java heap space indicates that NiFi is running out of memory while processing your flow. Since you are using NiFi 1.0 with around 123 processors and also seems to handle about 200 flow files of 50 MB each, the data load is quite higher than usual. Even with 4 GB of heap memory configured in bootstrap.conf, NiFi may not be able to handle this workload efficiently due to memory constraints and known inefficiencies in that version.
Upgrading to a newer version of NiFi can be considered as the best way recommended. This is suggested because in most cases, later releases will include several memory and performance optimizations that will help you to handle such circumstances. Along with this change, consider reducing the number of concurrent tasks, processing smaller batches, setting appropriate back pressure limits, and ensuring repositories use disk storage instead of memory. Monitoring heap usage through GC logs can also help identify memory-heavy processors and prevent similar issues in the future. If you are interested in learning about the types of OutOfMemoryError, you can check out this blog: Types of OutOfMemoryError, Causes, and Solutions.