# Shard Timeout

**URL:** <https://discuss.elastic.co/t/shard-timeout/6563>\
**Category:** Elasticsearch\
**Created:** [February 1, 2012, 11:54am UTC](https://discuss.elastic.co/t/shard-timeout/6563 "2012-02-01T11:54:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inflynx](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@inflynx](https://discuss.elastic.co/u/inflynx)\
**Post date:** [February 1, 2012, 11:54am UTC](https://discuss.elastic.co/t/shard-timeout/6563/1 "2012-02-01T11:54:48Z")

</div>

Hi,

I am tring to increase the timeout for the shard with little luck.  
The default value is [1m], which I'd like to increase to [3m] as follows:

String json = marshaller.write(entity);  
aggregate.add(indexRequest(getIndexName(entity.getClass()))  
.type(entity.getTypeName())  
.id(entity.getId())  
.source(json)  
.timeout(timeValueMinutes(3)));

However, ElasticSearch does not seem to pick up the change and times out on 1m anyway.  
Is there anything else that I may be missing?

Thanks so much!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 5, 2012, 11:46am UTC](https://discuss.elastic.co/t/shard-timeout/6563/2 "2012-02-05T11:46:37Z")

</div>

I believe the problem comes from the fact that the index does not exists (or its a "blocked" meta data state, where we don't know which indices we have), and then the create index API is executed with its own timeout instead of using the index request timeout. I fixed it in master: [Index / Delete API: timeout should apply automatically to the auto create index API master timeout · Issue #1664 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1664).

On Wednesday, February 1, 2012 at 1:54 PM, inflynx wrote:

> Hi,
> 
> I am tring to increase the timeout for the shard with little luck.  
> The default value is [1m], which I'd like to increase to [3m] as follows:
> 
> String json = marshaller.write(entity);  
> aggregate.add(indexRequest(getIndexName(entity.getClass()))  
> .type(entity.getTypeName())  
> .id(entity.getId())  
> .source(json)  
> .timeout(timeValueMinutes(3)));
> 
> However, Elasticsearch does not seem to pick up the change and times out on  
> 1m anyway.  
> Is there anything else that I may be missing?
> 
> Thanks so much!
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Shard-Timeout-tp3706354p3706354.html](http://elasticsearch-users.115913.n3.nabble.com/Shard-Timeout-tp3706354p3706354.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com) ([http://Nabble.com](http://Nabble.com)).

---

<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, 3:40am UTC](https://discuss.elastic.co/t/shard-timeout/6563/3 "2017-07-06T03:40:35Z")

</div>


