# Bulk timeout

**URL:** <https://discuss.elastic.co/t/bulk-timeout/99599>\
**Category:** Elasticsearch\
**Created:** [September 6, 2017, 2:31pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599 "2017-09-06T14:31:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Davidovich](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Alex\_Davidovich](https://discuss.elastic.co/u/Alex_Davidovich)\
**Post date:** [September 6, 2017, 2:31pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/1 "2017-09-06T14:31:53Z")

</div>

I am planning to set a timeout for my bulk requests.  
Is there a possible way to know, when the timeout exceeds, whether the request is still being processed by ES?  
I want to retry some time after the timeout exceeds and I am afraid of a situation where I will send the same bulk again while it exists in the DB (but took a long time to insert in my first attempt)

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [September 6, 2017, 4:18pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/2 "2017-09-06T16:18:09Z")

</div>

If you want to index that data anyway, why would you set a timeout?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 6, 2017, 5:03pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/3 "2017-09-06T17:03:09Z")

</div>

If you are having slow bulk requests, why not try to resolve that rather than introducing a timeout that could lead to duplicates getting created?

---

<div class="post-metadata">

**Author:** ![Alex\_Davidovich](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Alex\_Davidovich](https://discuss.elastic.co/u/Alex_Davidovich)\
**Post date:** [September 6, 2017, 5:55pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/4 "2017-09-06T17:55:37Z")

</div>

I don't have slow bulks. My usecase is:  
An internal component sends bulk requests and waits for an answer. If there is no answer after 4 seconds, it retries.  
I cant let elastic try processing a bulk forever...  
What do you suggest in this case?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 6, 2017, 6:48pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/5 "2017-09-06T18:48:54Z")

</div>

What is your average bulk latency? How frequently do you see latencies exceeding the 4 second timeout?

---

<div class="post-metadata">

**Author:** ![Alex\_Davidovich](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@Alex\_Davidovich](https://discuss.elastic.co/u/Alex_Davidovich)\
**Post date:** [September 6, 2017, 7:03pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/6 "2017-09-06T19:03:05Z")

</div>

The system is in a development stage. There is no problem with bulk latency. We just want to define a max limit for waiting. We want to understand whether we can verify that there is no more processing for this request in ES server when we retry the request.

---

<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:** [October 4, 2017, 7:03pm UTC](https://discuss.elastic.co/t/bulk-timeout/99599/7 "2017-10-04T19:03:18Z")

</div>

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