# Es readtimeout occurs

**URL:** <https://discuss.elastic.co/t/es-readtimeout-occurs/299085>\
**Category:** Elasticsearch\
**Created:** [March 8, 2022, 12:12pm UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085 "2022-03-08T12:12:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 8, 2022, 12:12pm UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/1 "2022-03-08T12:12:11Z")

</div>

At 5:11, search readtimeout occurred a lot.

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d607005ce31add1cf4282e76124be6007af6ef54.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3c12d61c1cb2b041d90e23aa21229926827439b2.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/51761917d6dab24a1d9f493ac8a0f01b0342b7ac.jpeg)

When we execute batch execution, if the primary shard is indexed, we are increasing the replica shard at that time, But at that time, the search engine creates replica shards, and as you can see from the metrix, a large amount of data is indexed, so the segment count rises rapidly.  
So merge, flush, refresh spike...

Any good solutions?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 8, 2022, 10:42pm UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/2 "2022-03-08T22:42:03Z")

</div>

> [@slowup](#):
>
> The shard size per node increased as it changed from 5 nodes to now 3 and this was caused by

By....? 😉

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 9, 2022, 4:14am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/3 "2022-03-09T04:14:08Z")

</div>

@warkolm  
sorry i removed that part  
It has nothing to do with it, so ignore it and answer it! thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 9, 2022, 4:24am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/4 "2022-03-09T04:24:46Z")

</div>

> [@slowup](#):
>
> When we execute batch execution, if the primary shard is indexed, we are increasing the replica shard at that time

Can you clarify this, as it's mixing a few things and doesn't make sense to me sorry.

Batch execution?  
"if the primary shard is indexed"?

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 10, 2022, 12:50am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/5 "2022-03-10T00:50:32Z")

</div>

@warkolm  
once again  
Our batch job increments the replica shard when the index on the primary shard is complete, but then the problem is that the replica shard is created too quickly.

Even if the time zone of the image above and the image below are different, the problem is the same, so you can ignore the time zone

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/a/3a3efd991a038fb6ed020dd1a3ba0ed38b9245e6.png)

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d15eab28ff48d1506a5fe7a19ee03aff74cdbbed.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/519cef3fcc48b714293fa922e8d9f7ed2d49fcbe.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 10, 2022, 2:39am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/6 "2022-03-10T02:39:26Z")

</div>

> [@slowup](#):
>
> but then the problem is that the replica shard is created too quickly.

Why is that a problem?

Sorry, it's really not clear to me where this timeout you reference is coming from, nor what the problem you are seeing is. I understand you are showing us some graphs, but there's no context as to why you think these are causing issues, and where those issues are showing up.

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 10, 2022, 2:49am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/7 "2022-03-10T02:49:55Z")

</div>

@warkolm  
Readtimeout occurs every time the i/o operation is high.  
The reason why the i/o operation is high is when creating a replica shard...  
When creating a replica shard, merge, refresh, and flush all increase, which causes readtimeout.

Do you understand now?

I need a solution for that

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 10, 2022, 2:51am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/8 "2022-03-10T02:51:10Z")

</div>

Where is the read timeout occuring?

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 10, 2022, 2:53am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/9 "2022-03-10T02:53:42Z")

</div>

@warkolm  
Occurs in the api using the index shown in the metric

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 10, 2022, 2:56am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/10 "2022-03-10T02:56:57Z")

</div>

There's no timeout metric in those images.

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 10, 2022, 3:03am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/11 "2022-03-10T03:03:18Z")

</div>

@warkolm  
Metric beat doesn't provide a timeout...

Are you saying you have no insight on this indicator?  
So what do you need?? tell me that

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a0b4359b084176f85623aaef5a2dfb1d0a2a3670.png)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 10, 2022, 3:07am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/12 "2022-03-10T03:07:16Z")

</div>

In the OP you state;

> [@slowup](#):
>
> search readtimeout occurred a lot

There are spikes in activity and other things, but if you are increasing replicas then that is to be expected.  
However none of what you have provided shows a timeout.

So, where is this "search readtimeout" coming from if it's not in any of the metrics you have?

---

<div class="post-metadata">

**Author:** ![slowup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/slowup/32/99097_2.png) [@slowup](https://discuss.elastic.co/u/slowup)\
**Post date:** [March 10, 2022, 3:18am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/13 "2022-03-10T03:18:00Z")

</div>

@warkolm

We cut the request from the api if it gets longer than 1 second  
are you okay now?

[2022-03-10 07:17:15][/i-0a63522c348cba4fd.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-0a96bdeb155a50a12.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-0718f570d6728b257.][ERROR][xlog Error] : [hystrix]EsGoodsCountClient#EsGoodsCountClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-0de020cdcf46d490c.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-0a33d4d79a4c96630.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-0a96bdeb155a50a12.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:15][/i-03237dc072449c3ee.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/i-09d5625d41e21a8bb.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/i-03237dc072449c3ee.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/i-0718f570d6728b257.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:16][/i-0718f570d6728b257.][ERROR][xlog Error] : [hystrix]EsSearchTabClient#EsSearchTabClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-0a96bdeb155a50a12.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-0de020cdcf46d490c.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-0d0ed434471719f8e.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-0de020cdcf46d490c.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-0718f570d6728b257.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:17][/i-03237dc072449c3ee.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:19][/i-0718f570d6728b257.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:19][/i-0de020cdcf46d490c.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:22][/i-0a63522c348cba4fd.][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:26][/i-0d09f17015ba165ca.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:26][/][ERROR][xlog Error] : [hystrix]EsGoodsCountClient#EsGoodsCountClient - Read timed out  
7:17  
[2022-03-10 07:17:27][/i-0a33d4d79a4c96630.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:27][/][ERROR][xlog Error] : [hystrix]GoodsSearchClient#GoodsSearchClient - Read timed out  
7:17  
[2022-03-10 07:17:27][/i-0d09f17015ba165ca.][ERROR][xlog Error] : [hystrix]GoodsClient#GoodsClient - Read timed out  
7:17  
[2022-03-10 07:17:27][/][ERROR][xlog Error] : [hystrix]EsGoodsCountClient#EsGoodsCountClient - Read timed out

@mayya help me

---

<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:** [April 7, 2022, 3:18am UTC](https://discuss.elastic.co/t/es-readtimeout-occurs/299085/14 "2022-04-07T03:18:28Z")

</div>

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