# Logstash Stops Very Frequently

**URL:** <https://discuss.elastic.co/t/logstash-stops-very-frequently/364843>\
**Category:** Logstash\
**Created:** [August 13, 2024, 3:48pm UTC](https://discuss.elastic.co/t/logstash-stops-very-frequently/364843 "2024-08-13T15:48:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awesomeparam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/awesomeparam/32/136750_2.png) [@awesomeparam](https://discuss.elastic.co/u/awesomeparam)\
**Post date:** [August 13, 2024, 3:48pm UTC](https://discuss.elastic.co/t/logstash-stops-very-frequently/364843/1 "2024-08-13T15:48:14Z")

</div>

Using the version 5.6.2 of Logstash, and I see lot of times the following message in the logstash-json.log file

{"level":"ERROR","loggerName":"logstash.shutdownwatcher","timeMillis":1723464009728,"thread":"Ruby-0-Thread-504: /usr/share/logstash/logstash-core/lib/logstash/shutdown\_watcher.rb:31","logEvent":{"message":"The shutdown process appears to be stalled due to busy or blocked plugins. Check the logs for more information."}}

Please help

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [August 13, 2024, 4:32pm UTC](https://discuss.elastic.co/t/logstash-stops-very-frequently/364843/2 "2024-08-13T16:32:52Z")

</div>

Hello and welcome,

Version 5.6.2 is too old, there is no support for it anymore and a lot has changed since it was released.

The supported versions are 7.17.23 and 8.15.0, please see if you can upgrade.

Are you using persistent queues? The error you shared normally happens when logstash received a shutdown command, but still has to drain the date in the persistent queues.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 13, 2024, 5:49pm UTC](https://discuss.elastic.co/t/logstash-stops-very-frequently/364843/3 "2024-08-13T17:49:45Z")

</div>

If you are getting that message from ShutdownWatcherExt you should also be getting a message that points you towards the issue. For example....

> [org.logstash.execution.ShutdownWatcherExt] {  
> "inflight\_count"=\>1, "stalling\_threads\_info"=\>{[...], "id"=\>"..."}]=\>[{"thread\_id"=\>68, "name"=\>"[main]\>worker0",  
> "current\_call"=\>"[...]/vendor/bundle/jruby/3.1.0/gems/logstash-output-tcp-6.2.1/lib/logstash/outputs/tcp.rb:355:in `sleep'"}], ...

Here it is a tcp output [stuck in a loop](https://github.com/logstash-plugins/logstash-output-tcp/blob/653d875bf9cef8cb49819b48ea4e6e42d9d96289/lib/logstash/outputs/tcp.rb#L355) trying to connect to a remote server (a tcp output will not shut down until it has successfully started up). It will loop forever printing the same error messages again and again.
