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

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628>\
**Category:** Logstash\
**Created:** [September 3, 2015, 5:16pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628 "2015-09-03T17:16:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thiruna](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thiruna](https://discuss.elastic.co/u/thiruna)\
**Post date:** [September 3, 2015, 5:16pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/1 "2015-09-03T17:16:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 3, 2015, 6:01pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/2 "2015-09-03T18:01:31Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![thiruna](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thiruna](https://discuss.elastic.co/u/thiruna)\
**Post date:** [September 3, 2015, 9:05pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/3 "2015-09-03T21:05:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 3, 2015, 9:14pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/4 "2015-09-03T21:14:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thiruna](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thiruna](https://discuss.elastic.co/u/thiruna)\
**Post date:** [September 10, 2015, 4:08pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/5 "2015-09-10T16:08:28Z")

</div>

H Magnus,

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

---

<div class="post-metadata">

**Author:** ![sockaddr\_in](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sockaddr_in/32/20854_2.png) [@sockaddr\_in](https://discuss.elastic.co/u/sockaddr_in)\
**Post date:** [December 13, 2016, 4:45pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/6 "2016-12-13T16:45:50Z")

</div>

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

 ![](https://us1.discourse-cdn.com/elastic/original/2X/6/68ae50028b4a92a6b742fdc3c582e0bd6f61c721.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:29am UTC](https://discuss.elastic.co/t/is-there-any-way-to-kill-shut-down-logstash-in-graceful-manner/28628/7 "2017-07-06T04:29:54Z")

</div>


