# ES Timeout issues?

**URL:** <https://discuss.elastic.co/t/es-timeout-issues/10219>\
**Category:** Elasticsearch\
**Created:** [January 3, 2013, 4:47pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219 "2013-01-03T16:47:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerome\_Gagnon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerome_gagnon/32/2178_2.png) [@Jerome\_Gagnon](https://discuss.elastic.co/u/Jerome_Gagnon)\
**Post date:** [January 3, 2013, 4:47pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/1 "2013-01-03T16:47:08Z")

</div>

This is what I'm doing in the Java API for search;

> <https://gist.github.com/anonymous/4444788>

And even if I put a 2 sec timeout, I have often requests that take more  
than 5 and even 10 seconds that does not time out. But sometime, I have  
some query that take under 2 sec and says timed out.

On the documentation it says;  
timeout A search timeout, bounding the search request to be executed within  
the specified time value and bail with the hits accumulated up to that  
point when expired. Defaults to no timeout.

With that I'm expecting every query to be under (or roughly) around 2  
second, but not 5 or 10 seconds.

Am I doing something wrong, or is it really and ES issue ?

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [January 3, 2013, 5:28pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/2 "2013-01-03T17:28:40Z")

</div>

I have seen this issue pop up on the mailing list every now and then. The  
timeout value is used only by the TimeLimitingCollector, so it only limits  
the time used by Lucene in collecting documents. The parsing/gather/reduce  
phases all lie outside of this time interval. However, I would find it  
strange that something like the reduce phase would take so long.

For the record, I have the same issue.

--  
Ivan

On Thu, Jan 3, 2013 at 8:47 AM, Jérôme Gagnon [jerome.gagnon.1@gmail.com](mailto:jerome.gagnon.1@gmail.com)wrote:

> This is what I'm doing in the Java API for search;  
> [Timeout · GitHub](https://gist.github.com/4444788)
> 
> And even if I put a 2 sec timeout, I have often requests that take more  
> than 5 and even 10 seconds that does not time out. But sometime, I have  
> some query that take under 2 sec and says timed out.
> 
> On the documentation it says;  
> timeout A search timeout, bounding the search request to be executed  
> within the specified time value and bail with the hits accumulated up to  
> that point when expired. Defaults to no timeout.
> 
> With that I'm expecting every query to be under (or roughly) around 2  
> second, but not 5 or 10 seconds.
> 
> Am I doing something wrong, or is it really and ES issue ?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Jerome\_Gagnon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerome_gagnon/32/2178_2.png) [@Jerome\_Gagnon](https://discuss.elastic.co/u/Jerome_Gagnon)\
**Post date:** [January 3, 2013, 5:49pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/3 "2013-01-03T17:49:46Z")

</div>

Possibly because I use a lot of facetting on the same query ? Facetting and  
sorting is done on the reduce phase if I'm not wrong ?

On Thursday, January 3, 2013 12:28:40 PM UTC-5, Ivan Brusic wrote:

> I have seen this issue pop up on the mailing list every now and then. The  
> timeout value is used only by the TimeLimitingCollector, so it only limits  
> the time used by Lucene in collecting documents. The parsing/gather/reduce  
> phases all lie outside of this time interval. However, I would find it  
> strange that something like the reduce phase would take so long.
> 
> For the record, I have the same issue.
> 
> --  
> Ivan
> 
> On Thu, Jan 3, 2013 at 8:47 AM, Jérôme Gagnon \<[jerome....@gmail.com](mailto:jerome....@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > This is what I'm doing in the Java API for search;  
> > [Timeout · GitHub](https://gist.github.com/4444788)
> > 
> > And even if I put a 2 sec timeout, I have often requests that take more  
> > than 5 and even 10 seconds that does not time out. But sometime, I have  
> > some query that take under 2 sec and says timed out.
> > 
> > On the documentation it says;  
> > timeout A search timeout, bounding the search request to be executed  
> > within the specified time value and bail with the hits accumulated up to  
> > that point when expired. Defaults to no timeout.
> > 
> > With that I'm expecting every query to be under (or roughly) around 2  
> > second, but not 5 or 10 seconds.
> > 
> > Am I doing something wrong, or is it really and ES issue ?
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [January 3, 2013, 5:59pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/4 "2013-01-03T17:59:30Z")

</div>

Facets are implemented with FacetCollectors, which means they are computed  
at search time. The TimeLimitingCollector is a simple wrapper around the  
collectors that do the real work. The same goes for sorting, although there  
has to be logic during the reduce phase that resorts and aggregates facets.

--  
Ivan

On Thu, Jan 3, 2013 at 9:49 AM, Jérôme Gagnon [jerome.gagnon.1@gmail.com](mailto:jerome.gagnon.1@gmail.com)wrote:

> Possibly because I use a lot of facetting on the same query ? Facetting  
> and sorting is done on the reduce phase if I'm not wrong ?
> 
> On Thursday, January 3, 2013 12:28:40 PM UTC-5, Ivan Brusic wrote:
> 
> > I have seen this issue pop up on the mailing list every now and then.  
> > The timeout value is used only by the TimeLimitingCollector, so it only  
> > limits the time used by Lucene in collecting documents. The  
> > parsing/gather/reduce phases all lie outside of this time interval.  
> > However, I would find it strange that something like the reduce phase would  
> > take so long.
> > 
> > For the record, I have the same issue.
> > 
> > --  
> > Ivan
> > 
> > On Thu, Jan 3, 2013 at 8:47 AM, Jérôme Gagnon [jerome....@gmail.com](mailto:jerome....@gmail.com)wrote:
> > 
> > > This is what I'm doing in the Java API for search;  
> > > [https://gist.github.com/\*\*4444788](https://gist.github.com/**4444788) [https://gist.github.com/4444788](https://gist.github.com/4444788)
> > > 
> > > And even if I put a 2 sec timeout, I have often requests that take more  
> > > than 5 and even 10 seconds that does not time out. But sometime, I have  
> > > some query that take under 2 sec and says timed out.
> > > 
> > > On the documentation it says;  
> > > timeout A search timeout, bounding the search request to be executed  
> > > within the specified time value and bail with the hits accumulated up to  
> > > that point when expired. Defaults to no timeout.
> > > 
> > > With that I'm expecting every query to be under (or roughly) around 2  
> > > second, but not 5 or 10 seconds.
> > > 
> > > Am I doing something wrong, or is it really and ES issue ?
> > > 
> > > --
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [January 3, 2013, 7:05pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/5 "2013-01-03T19:05:50Z")

</div>

Hi Jérôme ,

It's a known ES issue.

## Otis

Solr & Elasticsearch Support

> **[Sematext | IT System Monitoring Tools for DevOps](https://sematext.com/)**
>
> IT system monitoring and management tools for DevOps who need 24x7 live visibility into their infrastructure.

On Thursday, January 3, 2013 11:47:08 AM UTC-5, Jérôme Gagnon wrote:

> This is what I'm doing in the Java API for search;  
> [Timeout · GitHub](https://gist.github.com/4444788)
> 
> And even if I put a 2 sec timeout, I have often requests that take more  
> than 5 and even 10 seconds that does not time out. But sometime, I have  
> some query that take under 2 sec and says timed out.
> 
> On the documentation it says;  
> timeout A search timeout, bounding the search request to be executed  
> within the specified time value and bail with the hits accumulated up to  
> that point when expired. Defaults to no timeout.
> 
> With that I'm expecting every query to be under (or roughly) around 2  
> second, but not 5 or 10 seconds.
> 
> Am I doing something wrong, or is it really and ES issue ?

--

---

<div class="post-metadata">

**Author:** ![Connie\_Yang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/connie_yang/32/1167_2.png) [@Connie\_Yang](https://discuss.elastic.co/u/Connie_Yang)\
**Post date:** [May 20, 2013, 10:34pm UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/6 "2013-05-20T22:34:07Z")

</div>

Hi Otis,

Is there a solution for this? More importantly, is there a fix for  
Elasticsearch 0.90.0 release?

Thanks,  
Connie

On Thursday, January 3, 2013 11:05:50 AM UTC-8, Otis Gospodnetic wrote:

> Hi Jérôme ,
> 
> It's a known ES issue.
> 
> ## Otis
> 
> Solr & Elasticsearch Support  
> [http://sematext.com/](http://sematext.com/)
> 
> On Thursday, January 3, 2013 11:47:08 AM UTC-5, Jérôme Gagnon wrote:
> 
> > This is what I'm doing in the Java API for search;  
> > [Timeout · GitHub](https://gist.github.com/4444788)
> > 
> > And even if I put a 2 sec timeout, I have often requests that take more  
> > than 5 and even 10 seconds that does not time out. But sometime, I have  
> > some query that take under 2 sec and says timed out.
> > 
> > On the documentation it says;  
> > timeout A search timeout, bounding the search request to be executed  
> > within the specified time value and bail with the hits accumulated up to  
> > that point when expired. Defaults to no timeout.
> > 
> > With that I'm expecting every query to be under (or roughly) around 2  
> > second, but not 5 or 10 seconds.
> > 
> > Am I doing something wrong, or is it really and ES issue ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [May 27, 2013, 3:16am UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/7 "2013-05-27T03:16:53Z")

</div>

Hi Connie,

No, I don't think there were changes around timeouts in 0.90 release.

## Otis

ELASTICSEARCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)

On Monday, May 20, 2013 6:34:07 PM UTC-4, Connie Yang wrote:

> Hi Otis,
> 
> Is there a solution for this? More importantly, is there a fix for  
> Elasticsearch 0.90.0 release?
> 
> Thanks,  
> Connie
> 
> On Thursday, January 3, 2013 11:05:50 AM UTC-8, Otis Gospodnetic wrote:
> 
> > Hi Jérôme ,
> > 
> > It's a known ES issue.
> > 
> > ## Otis
> > 
> > Solr & Elasticsearch Support  
> > [http://sematext.com/](http://sematext.com/)
> > 
> > On Thursday, January 3, 2013 11:47:08 AM UTC-5, Jérôme Gagnon wrote:
> > 
> > > This is what I'm doing in the Java API for search;  
> > > [Timeout · GitHub](https://gist.github.com/4444788)
> > > 
> > > And even if I put a 2 sec timeout, I have often requests that take more  
> > > than 5 and even 10 seconds that does not time out. But sometime, I have  
> > > some query that take under 2 sec and says timed out.
> > > 
> > > On the documentation it says;  
> > > timeout A search timeout, bounding the search request to be executed  
> > > within the specified time value and bail with the hits accumulated up to  
> > > that point when expired. Defaults to no timeout.
> > > 
> > > With that I'm expecting every query to be under (or roughly) around 2  
> > > second, but not 5 or 10 seconds.
> > > 
> > > Am I doing something wrong, or is it really and ES issue ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:34am UTC](https://discuss.elastic.co/t/es-timeout-issues/10219/8 "2017-07-06T02:34:41Z")

</div>


