Support Questions

Find answers, ask questions, and share your expertise

Can the NiFi bootstrap process be configured to restart the core NiFi process if it hits a critical failure such as OOM?

avatar

I am aware that the NiFi bootstrap process can be configured to provide notifications in the event of a NiFi failure but I am wondering if we can configure the bootstrap process to not only detect and notify users of a failure but to also attempt to bring the NiFi process back to life? Am I missing an obvious config parameter in the guide?

1 ACCEPTED SOLUTION

avatar
Master Guru

The boostrap process restarts NiFi when the main NiFi process dies. An easy test is to start a new NiFi and then kill -9 the main process and you'll immediately see it come back with a new pid.

OOM would probably be tricky because a lot of times the Java process does not die when encountering an OOM and sticks around in some bad state.

View solution in original post

2 REPLIES 2

avatar
Guru

@Brandon Wilson I believe the best way to do this would be to install NiFi on your system using

$NIFI_HOME/bin/nifi.sh install

and then using an OS level processing management tool (supervisord on Ubuntu for example) to monitor that process and then restart it based on configurations that you provide to the process management tool.

avatar
Master Guru

The boostrap process restarts NiFi when the main NiFi process dies. An easy test is to start a new NiFi and then kill -9 the main process and you'll immediately see it come back with a new pid.

OOM would probably be tricky because a lot of times the Java process does not die when encountering an OOM and sticks around in some bad state.