Is there any way to kill / shut down logstash in graceful manner?

Hi,

We used to kill logstash process using kill -9 in our linux server. It looks we are forcefully shutting down the logstash. Is there anyway to shut down logstash in graceful manner. is kill -2 will be used for graceful shut down of logstash?

We used to kill logstash process using kill -9 in our linux server. It looks we are forcefully shutting down the logstash.

Why on earth are you shutting down processes with SIGKILL?

Is there anyway to shut down logstash in graceful manner. is kill -2 will be used for graceful shut down of logstash?

SIGINT (2) will cause an orderly shutdown of both Logstash 1.4 and 1.5. SIGTERM (15) will shut down 1.5 gracefully but not 1.4.

2 Likes

Hi Magnus,

Thanks for the reply.

Currently we are using logstash 1.4.2 and tried to shut down logstash process with kill-2 (SIGINT (2) on our linux server. However it didn't kill for hours. So thought of shutting down with kill -9 (SIGKILL).

Do you have any recommendation for graceful shut down for logstash 1.4.2?

Thanks,
Thiru.

If SIGINT doesn't work you should use SIGTERM. It won't cause a pipeline flush and completely orderly shutdown (on 1.4) but it's better than SIGKILL.

1 Like

H Magnus,

SIGTERM(15) is working fine in logstash (1.4) as well. Thanks for the info....!

I use the following method to make the logstash reload configuration file, but did not take effect, what is the reason?