# What happens on shutdown if queue.drain is true but output is unavailable?

**URL:** <https://discuss.elastic.co/t/what-happens-on-shutdown-if-queue-drain-is-true-but-output-is-unavailable/349680>\
**Category:** Logstash\
**Created:** [December 19, 2023, 7:29pm UTC](https://discuss.elastic.co/t/what-happens-on-shutdown-if-queue-drain-is-true-but-output-is-unavailable/349680 "2023-12-19T19:29:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noobiewan](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@noobiewan](https://discuss.elastic.co/u/noobiewan)\
**Post date:** [December 19, 2023, 7:29pm UTC](https://discuss.elastic.co/t/what-happens-on-shutdown-if-queue-drain-is-true-but-output-is-unavailable/349680/1 "2023-12-19T19:29:44Z")

</div>

Hi there,

I'm currently running Logstash on Kubernetes and have configured a pipeline with a Persistent Queue and the setting `queue.drain: true`. In this setup, I'm curious about Logstash's behavior when it receives a SIGTERM signal and encounters a scenario where the output is unavailable.

Specifically, does Logstash indefinitely wait to drain the queue, risking ungraceful termination, or does it detect the output failure and proceed with the shutdown, leaving messages queued?

Thank you.

---

<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:** [January 16, 2024, 7:30pm UTC](https://discuss.elastic.co/t/what-happens-on-shutdown-if-queue-drain-is-true-but-output-is-unavailable/349680/2 "2024-01-16T19:30:19Z")

</div>

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