# Why is Logstash stalling for so long?

**URL:** <https://discuss.elastic.co/t/why-is-logstash-stalling-for-so-long/126951>\
**Category:** Logstash\
**Created:** [April 5, 2018, 2:34pm UTC](https://discuss.elastic.co/t/why-is-logstash-stalling-for-so-long/126951 "2018-04-05T14:34:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arisbanach](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@arisbanach](https://discuss.elastic.co/u/arisbanach)\
**Post date:** [April 5, 2018, 2:34pm UTC](https://discuss.elastic.co/t/why-is-logstash-stalling-for-so-long/126951/1 "2018-04-05T14:34:09Z")

</div>

I have a pipeline set up to an S3 bucket that has ~700k files in it. When I restart a pipeline (I have auto-restart enabled) it takes hours to restart. Looking at Logstash's logs I see huge blocks of

```
[2018-04-05T14:30:20,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:25,702][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:30,702][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:35,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:40,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:45,702][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:50,702][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:30:55,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:31:00,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:31:05,701][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}
[2018-04-05T14:31:10,702][WARN][logstash.shutdownwatcher] {"inflight_count"=>5, "stalling_thread_info"=>{}}

```

It started out with `inflight_count` in the hundreds, but even when it gets down to 5, I don't know why it is taking so long to just stop these threads.

---

<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:** [May 3, 2018, 2:34pm UTC](https://discuss.elastic.co/t/why-is-logstash-stalling-for-so-long/126951/2 "2018-05-03T14:34:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
