# Few worker threads keep running even after logstash is shutdown

**URL:** <https://discuss.elastic.co/t/few-worker-threads-keep-running-even-after-logstash-is-shutdown/241535>\
**Category:** Logstash\
**Created:** [July 16, 2020, 7:14pm UTC](https://discuss.elastic.co/t/few-worker-threads-keep-running-even-after-logstash-is-shutdown/241535 "2020-07-16T19:14:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diptee](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Diptee](https://discuss.elastic.co/u/Diptee)\
**Post date:** [July 16, 2020, 7:14pm UTC](https://discuss.elastic.co/t/few-worker-threads-keep-running-even-after-logstash-is-shutdown/241535/1 "2020-07-16T19:14:34Z")

</div>

Hi,  
We have configured logstash(using default pipeline configuration). We have just one pipeline running.  
When I start logstash I see it has 4 pipeline workers and batch size of 125. I am using IMAP input plugin to process emails from server.

I see that all 4 workers establish connection with IMAP.  
I found that when logstash is shutdown only 1 connection is relinquished, the other workers are still keeping the connection.  
I want to know how to shutdown other workers?

Thanks in advance.

---

<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:** [August 13, 2020, 7:14pm UTC](https://discuss.elastic.co/t/few-worker-threads-keep-running-even-after-logstash-is-shutdown/241535/2 "2020-08-13T19:14:43Z")

</div>

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