# Redis input pipeline intermittently stops for couple minutes

**URL:** <https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400>\
**Category:** Logstash\
**Created:** [June 12, 2019, 11:36am UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400 "2019-06-12T11:36:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [June 12, 2019, 11:36am UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/1 "2019-06-12T11:36:32Z")

</div>

Hi!

One of my "heavy duty" pipelines started acting strangely in the past weeks. I get alerts that ingesting stopped then I see that after a spike everything goes back to normal. I checked Elastic and Logstash logs on all nodes and there isn't anything. The Redis server log is empty since it was started a couple of months ago.

Logstash pipeline event rate:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/f/bff1f026bd02cdd87d4ab4941175ccd7bcb26d2f.png)

Redis metrics:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/1/916032d8b3b766ebd707abfd2998fdf061998f70.png)

As you see when Logstash stops getting events, Redis memory usage spikes which means the data flow is consistent. I checked various server related metrics but I don't see anything which would indicate why this particular pipeline stops. Longer (~2 minutes) pauses happen a couple of times a day (3-8) but when I check the event rate I spotted several occasions where it dropped to 0 but then returned working. However, none of the other pipelines (where data flow is consistent) shows a similar pattern.

Specs: Logstash 7.0.0; Redis server v=5.0.4

Is there any way to debug this and solve the problem? I'm out of ideas on what to check.

Thank you!

---

<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:** [June 12, 2019, 2:08pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/2 "2019-06-12T14:08:40Z")

</div>

> [@YvorL](#):
>
> Is there any way to debug this and solve the problem? I'm out of ideas on what to check.

If you have multiple pipelines in a single instance and only one of them stops processing then I would lean towards it being a blocked output and back-pressure shutting down the pipeline. You could test that by enabling a persistent queue on the output and then monitoring the [pipeline stats API](https://www.elastic.co/guide/en/logstash/current/node-stats-api.html#pipeline-stats) which will indicate [how much](https://github.com/elastic/logstash/pull/6331) of the queue is full. If that rules out a blocked output it suggests a problem on the input side.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [June 13, 2019, 12:54pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/3 "2019-06-13T12:54:06Z")

</div>

Thank you!  
I'll dive into the topic and post results later.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [June 18, 2019, 10:34am UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/4 "2019-06-18T10:34:34Z")

</div>

@Badger I've set up PQ (2GB) on one of my LS instances and saw that sometimes the queue gets filled. The event count and the queue size gradually grew. Since then, I didn't saw any alerts or "zero event" period. Does that mean that the ES servers couldn't keep up with the temporarily boost of events so it had to "deny" the inputs from that particular LS pipeline?  
In any case, what options do I have if I want to keep events indexed as fast as possible? If I understand the issue correctly, the event rate is the issue and l'll need to add a new ES node to the cluster, correct?

Thank you!

---

<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:** [June 18, 2019, 1:37pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/5 "2019-06-18T13:37:37Z")

</div>

> [@YvorL](#):
>
> Does that mean that the ES servers couldn't keep up with the temporarily boost of events so it had to "deny" the inputs from that particular LS pipeline?

That seems like a reasonable interpretation. You do not have enough capacity on the ES side.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [June 18, 2019, 2:40pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/6 "2019-06-18T14:40:19Z")

</div>

Thanks!  
It's strange though that I don't see any indication in the ES logs or stack monitoring data ☹

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [June 21, 2019, 1:43pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/7 "2019-06-21T13:43:41Z")

</div>

@badger: yesterday I was closely monitoring the stack using mostly built-in charts in Kibana. Unfortunately, adding PQ to two of the LS nodes only resulted in avoiding zero indexing for that specific index. Now I see that there are still flatlines on the emitted rate count. Also, I'm sure that the ES nodes can handle twice the amount of events since there were times when the PQ-s sent double the normal amount and those were handled without any issue.  
If you check the image I attached, the first row shows another type of log from the same servers and it does not show similarity...  
The instances have plenty of free RAM (dozens of GB) same for LS which has 30GB overall. Same for CPU (32 core servers).  
As I read some docs regarding this topic, ES should response with '429' if there are too many requests, right? But all logs (INFO level) aren't showing anything during these events.  
So I don't really know what happens there. ☹  
The thing I really don't get is why do other pipelines with 1.5-2K events have a sawtooth-like pattern while this specific one is mostly a straight line with huge amplitude after flatlining.

---

<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 19, 2019, 1:43pm UTC](https://discuss.elastic.co/t/redis-input-pipeline-intermittently-stops-for-couple-minutes/185400/8 "2019-07-19T13:43:49Z")

</div>

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