Hi Pierre,

thanks for your input.

I am already intercepting AWS termination notification so I will add a few 
steps and see how it reacts

Thanks again
________________________________
From: Pierre Villard <[email protected]>
Sent: Wednesday, August 28, 2019 4:17 AM
To: [email protected] <[email protected]>
Subject: Re: clean shutdown

Hi Jean-Sebastien,

When you stop NiFi, by default, it will try to gracefully stop everything in 10 
seconds, and if not all components are nicely stopped after that, it will force 
shut down the NiFi process. This is configured with 
"nifi.flowcontroller.graceful.shutdown.period" in nifi.properties file. If you 
have processors/CS that might take longer to stop gracefully (because of 
connections to external systems for instance), you could increase this value.

I'm not very familiar with AWS spot instances but I'd try to catch the spot 
notification event to stop the NiFi service on the host before the instance is 
stopped/killed.

Pierre



Le mar. 27 août 2019 à 20:05, Jean-Sebastien Vachon 
<[email protected]<mailto:[email protected]>> a écrit :
Hi everybody,

I am working with AWS spot instances and one thing that is giving me a hard 
time is to perform a clean (and quick) shutdown of Nifi in order to prevent 
data loss.

AWS will give you about two minutes to clean up everything before the machine 
is actually shutdown.
Is there a way to stop/kill all processes running on the host without loosing 
anything? It is fine if all the flowfiles being processed are simply requeued.

Would simply killing the processes achieve this? (I doubt so)... would it be 
better to fetch a list of running processors and terminate them using Nifi's 
API?

All ideas and thoughts are welcome

thanks

Reply via email to