You are right. Yea it seems NiFi is the cause.
It created a bootsrap log. I see a bunch of errors there which starts NiFi and gives OutofMemory error and than shuts down the services.
I will check with NiFi community. If you have some thoughts on what I can do it will be helpful.
Thank you for the help so far! Appreciate it.
2017-10-23 17:32:51,614 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:32:51,631 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "FeedStatisticsManager-GatherStats-0"
2017-10-23 17:32:59,912 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:32:59,912 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "FileSystemRepository Workers Thread-4"
2017-10-23 17:33:11,457 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:11,457 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ActiveMQ InactivityMonitor ReadCheckTimer"
2017-10-23 17:33:13,110 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:13,110 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Provenance Maintenance Thread-2"
2017-10-23 17:33:21,289 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:21,289 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "logback-2"
2017-10-23 17:33:27,967 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:27,967 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Provenance Maintenance Thread-1"
2017-10-23 17:33:34,337 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:34,337 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Provenance Maintenance Thread-3"
2017-10-23 17:33:40,620 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:40,620 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ActiveMQ InactivityMonitor WriteCheckTimer"
2017-10-23 17:33:43,801 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:43,801 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@33140"
2017-10-23 17:33:50,137 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:50,137 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Event-Driven Process Thread-5"
2017-10-23 17:33:51,785 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:51,785 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "FileSystemRepository Workers Thread-2"
2017-10-23 17:33:53,380 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:53,381 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Write-Ahead Local State Provider Maintenance"
2017-10-23 17:33:55,045 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:55,046 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-15-thread-1"
2017-10-23 17:33:59,963 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:33:59,963 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Listen to Bootstrap"
2017-10-23 17:34:06,550 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:34:06,551 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Event-Driven Process Thread-2"
2017-10-23 17:34:08,259 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:34:08,260 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Timer-Driven Process Thread-1"
2017-10-23 17:34:41,410 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:34:41,410 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Flow Service Tasks Thread-2"
2017-10-23 17:34:53,196 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:34:53,197 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "DefaultMessageListenerContainer-1"
2017-10-23 17:35:01,989 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:35:01,989 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Cleanup Archive for default"
2017-10-23 17:35:05,776 ERROR [NiFi logging handler] org.apache.nifi.StdErr
2017-10-23 17:35:05,777 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
2017-10-23 17:35:08,075 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi
2017-10-23 17:47:27,350 INFO [main] o.a.n.b.NotificationServiceManager Successfully loaded the following 0 services: []
2017-10-23 17:47:27,357 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STARTED
2017-10-23 17:47:27,357 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_STOPPED
2017-10-23 17:47:27,357 INFO [main] org.apache.nifi.bootstrap.RunNiFi Registered no Notification Services for Notification Type NIFI_DIED
2017-10-23 17:47:27,486 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi is not running