# TransportClient Throws 'java.lang.OutOfMemoryError: GC overhead limit exceeded' when all nodes in cluster are down (1.1.1)

**URL:** https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267
**Category:** Elasticsearch
**Created:** [June 23, 2014, 6:14pm UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267 "2014-06-23T18:14:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Santiago\_Ferrer\_Dehe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santiago_ferrer_dehe/32/1469_2.png) [@Santiago\_Ferrer\_Dehe](https://discuss.elastic.co/u/Santiago_Ferrer_Dehe)
#### Post date: [June 23, 2014, 6:14pm UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/1 "2014-06-23T18:14:49Z")

</div>

Hi there!

I'm having this exception (_'java.lang.OutOfMemoryError: GC overhead limit  
exceeded'_) _in client_ when my ES 1.1.1 cluster goes down. Im having  
problems with the cluster (work in progress) but it doesn't seem right that  
the client server throws _OutOfMemoryError._

Client Spcs:

- Java 6u32
- Ubuntu 12.04 LTS
- Elasticsearch 1.1.1 Jar

The client is only use for searching. Any clue? If more information is need  
just let me know.

Thanks,  
Santi!

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 23, 2014, 7:06pm UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/2 "2014-06-23T19:06:58Z")

</div>

Most likely you have memory leaks in your app and your client memory was  
exhausted.

If you can show the client code how you submit queries and process  
responses and the stack traces you receive, more help could be possible to  
offer.

A general hint is to switch to Java 7.

Jörg

On Mon, Jun 23, 2014 at 8:14 PM, Santiago Ferrer Deheza \<  
[sa.ferrer.deheza@gmail.com](mailto:sa.ferrer.deheza@gmail.com)\> wrote:

> Hi there!
> 
> I'm having this exception (_'java.lang.OutOfMemoryError: GC overhead  
> limit exceeded'_) _in client_ when my ES 1.1.1 cluster goes down. Im  
> having problems with the cluster (work in progress) but it doesn't seem  
> right that the client server throws _OutOfMemoryError._
> 
> Client Spcs:
> 
> - Java 6u32
> - Ubuntu 12.04 LTS
> - Elasticsearch 1.1.1 Jar
> 
> The client is only use for searching. Any clue? If more information is  
> need just let me know.
> 
> Thanks,  
> Santi!
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEF-SdPeY0c\_3\_J%3Dyvq%2BoxsjND5LuDAzoiknVMVwKKX4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEF-SdPeY0c_3_J%3Dyvq%2BoxsjND5LuDAzoiknVMVwKKX4g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Santiago\_Ferrer\_Dehe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santiago_ferrer_dehe/32/1469_2.png) [@Santiago\_Ferrer\_Dehe](https://discuss.elastic.co/u/Santiago_Ferrer_Dehe)
#### Post date: [June 23, 2014, 8:29pm UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/3 "2014-06-23T20:29:32Z")

</div>

The rare thing is that happends when the cluster status is red (thats why i  
think the client is the problem).

This is my code

ElasticResponse response;

try{

if(category != null && !category.isEmpty()){

SearchRequestBuilder searchQuery = client.prepareSearch(ConfigFactory.load  
().getString("elasticsearch.updater.index"))

.setSearchType(SearchType.QUERY\_THEN\_FETCH).setSize(numberOfAds);

BoolQueryBuilder qb = QueryBuilders

.boolQuery();

FunctionScoreQueryBuilder functionQueryBuilder = createFunctionScore(  
external, qb);

List\<Map\<String, Object\>\> ads = new ArrayList\<Map\<String, Object\>\>();

String categPath = Category.getCategoryIdPath(category);

Deque categories = new LinkedList\<Elasticsearch.  
SearchCategory\>();

for(String category : categPath.split("\_")){

categories.addFirst(new SearchCategory(category,false, categPath));

}

functionQueryBuilder = functionQueryBuilder.boostMode(CombineFunction.MULT  
);

functionQueryBuilder = functionQueryBuilder.scoreMode("max");

fillWithFunctions(functionQueryBuilder,categories,INITIAL\_BOOST);

SearchResponse searchResponse = searchQuery.setTypes(categPath.split("\_")[  
0]).setQuery(functionQueryBuilder).execute().actionGet(50, TimeUnit.  
MILLISECONDS);

SearchHits hits = searchResponse.getHits();

Iterator it = hits.iterator();

int count = 0;

while(it.hasNext() && count \< numberOfAds){

Map\<String, Object\> sourceAsMap = it.next().sourceAsMap();

ads.add(sourceAsMap);

count++;

}

if(ads.isEmpty()){

Logger.info("ES - No ads found. Category: " + category);

response = new ElasticResponse(NO\_CONTENT);

}else{

response = new ElasticResponse(ads,OK, position);

}

}else{

Logger.info("ES - No category sent.");

response = new ElasticResponse(BAD\_REQUEST);

}

}catch(ElasticsearchTimeoutException e){

Logger.info("ES - Timeout.", e);

MetricsManager.getElasticsearchMetrics().incrementTimeoutCounter();

response = new ElasticResponse(REQUEST\_TIMEOUT);

}catch(Exception e){

Logger.error("Searching in elasticsearch",e);

response = new ElasticResponse(INTERNAL\_SERVER\_ERROR);

}

In the code you can see we define a timeout when executing _actionGet_.  
This works fine when the cluster is OK (we have a limited SLA) but when the  
ES Cluster goes down it doesn't take it into count, raising our SLA.

Thanks!

On Monday, June 23, 2014 4:07:06 PM UTC-3, Jörg Prante wrote:

> Most likely you have memory leaks in your app and your client memory was  
> exhausted.
> 
> If you can show the client code how you submit queries and process  
> responses and the stack traces you receive, more help could be possible to  
> offer.
> 
> A general hint is to switch to Java 7.
> 
> Jörg
> 
> On Mon, Jun 23, 2014 at 8:14 PM, Santiago Ferrer Deheza \<  
> [sa.ferre...@gmail.com](mailto:sa.ferre...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi there!
> > 
> > I'm having this exception (_'java.lang.OutOfMemoryError: GC overhead  
> > limit exceeded'_) _in client_ when my ES 1.1.1 cluster goes down. Im  
> > having problems with the cluster (work in progress) but it doesn't seem  
> > right that the client server throws _OutOfMemoryError._
> > 
> > Client Spcs:
> > 
> > - Java 6u32
> > - Ubuntu 12.04 LTS
> > - Elasticsearch 1.1.1 Jar
> > 
> > The client is only use for searching. Any clue? If more information is  
> > need just let me know.
> > 
> > Thanks,  
> > Santi!
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 23, 2014, 10:13pm UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/4 "2014-06-23T22:13:00Z")

</div>

Maybe it is not OOM but running out of file descriptors, that can only be  
seen in the stack trace.

TransportClient, by default, tries to reconnect quite aggressively, so if  
you could monitor the number of open network ports while you get OOM this  
would be helpful for analysis. Maybe you have sniff mode on (which is the  
default) and TransportClient retries are consuming all ports in despair...  
you may switch log level to debug to find out what TransportClient is doing.

To remedy the cluster red situation a little bit you can increase the  
timeout from 5s to say 30s (this will not solve the cause of the problem of  
course, it delays the OOM). And you should take attention of the number of  
responding shards in search responses, so you can bail out with fatal error  
when the number of responding shards is too low. Of course you could also  
check cluster health color once a minute or so.

Jörg

On Mon, Jun 23, 2014 at 10:29 PM, Santiago Ferrer Deheza \<  
[sa.ferrer.deheza@gmail.com](mailto:sa.ferrer.deheza@gmail.com)\> wrote:

> The rare thing is that happends when the cluster status is red (thats why  
> i think the client is the problem).
> 
> This is my code
> 
> ElasticResponse response;
> 
> try{
> 
> if(category != null && !category.isEmpty()){
> 
> SearchRequestBuilder searchQuery = client.prepareSearch(ConfigFactory.  
> load().getString("elasticsearch.updater.index"))
> 
> .setSearchType(SearchType.QUERY\_THEN\_FETCH).setSize(numberOfAds);
> 
> BoolQueryBuilder qb = QueryBuilders
> 
> .boolQuery();
> 
> FunctionScoreQueryBuilder functionQueryBuilder = createFunctionScore(  
> external, qb);
> 
> List\<Map\<String, Object\>\> ads = new ArrayList\<Map\<String, Object\>\>();
> 
> String categPath = Category.getCategoryIdPath(category);
> 
> Deque categories = new LinkedList\<Elasticsearch.  
> SearchCategory\>();
> 
> for(String category : categPath.split("\_")){
> 
> categories.addFirst(new SearchCategory(category,false, categPath));
> 
> }
> 
> functionQueryBuilder = functionQueryBuilder.boostMode(CombineFunction.  
> MULT);
> 
> functionQueryBuilder = functionQueryBuilder.scoreMode("max");
> 
> fillWithFunctions(functionQueryBuilder,categories,INITIAL\_BOOST);
> 
> SearchResponse searchResponse = searchQuery.setTypes(categPath.split("\_"  
> )[0]).setQuery(functionQueryBuilder).execute().actionGet(50, TimeUnit.  
> MILLISECONDS);
> 
> SearchHits hits = searchResponse.getHits();
> 
> Iterator it = hits.iterator();
> 
> int count = 0;
> 
> while(it.hasNext() && count \< numberOfAds){
> 
> Map\<String, Object\> sourceAsMap = it.next().sourceAsMap();
> 
> ads.add(sourceAsMap);
> 
> count++;
> 
> }
> 
> if(ads.isEmpty()){
> 
> Logger.info("ES - No ads found. Category: " + category);
> 
> response = new ElasticResponse(NO\_CONTENT);
> 
> }else{
> 
> response = new ElasticResponse(ads,OK, position);
> 
> }
> 
> }else{
> 
> Logger.info("ES - No category sent.");
> 
> response = new ElasticResponse(BAD\_REQUEST);
> 
> }
> 
> }catch(ElasticsearchTimeoutException e){
> 
> Logger.info("ES - Timeout.", e);
> 
> MetricsManager.getElasticsearchMetrics().incrementTimeoutCounter();
> 
> response = new ElasticResponse(REQUEST\_TIMEOUT);
> 
> }catch(Exception e){
> 
> Logger.error("Searching in elasticsearch",e);
> 
> response = new ElasticResponse(INTERNAL\_SERVER\_ERROR);
> 
> }
> 
> In the code you can see we define a timeout when executing _actionGet_.  
> This works fine when the cluster is OK (we have a limited SLA) but when the  
> ES Cluster goes down it doesn't take it into count, raising our SLA.
> 
> Thanks!
> 
> On Monday, June 23, 2014 4:07:06 PM UTC-3, Jörg Prante wrote:
> 
> > Most likely you have memory leaks in your app and your client memory was  
> > exhausted.
> > 
> > If you can show the client code how you submit queries and process  
> > responses and the stack traces you receive, more help could be possible to  
> > offer.
> > 
> > A general hint is to switch to Java 7.
> > 
> > Jörg
> > 
> > On Mon, Jun 23, 2014 at 8:14 PM, Santiago Ferrer Deheza \<  
> > [sa.ferre...@gmail.com](mailto:sa.ferre...@gmail.com)\> wrote:
> > 
> > > Hi there!
> > > 
> > > I'm having this exception (_'java.lang.OutOfMemoryError: GC overhead  
> > > limit exceeded'_) _in client_ when my ES 1.1.1 cluster goes down. Im  
> > > having problems with the cluster (work in progress) but it doesn't seem  
> > > right that the client server throws _OutOfMemoryError._
> > > 
> > > Client Spcs:
> > > 
> > > - Java 6u32
> > > - Ubuntu 12.04 LTS
> > > - Elasticsearch 1.1.1 Jar
> > > 
> > > The client is only use for searching. Any clue? If more information is  
> > > need just let me know.
> > > 
> > > Thanks,  
> > > Santi!
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHdNPJtHhuEWV9T2mCnNcVmESapVNRqcW35JfgnYRiJCQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHdNPJtHhuEWV9T2mCnNcVmESapVNRqcW35JfgnYRiJCQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Santiago\_Ferrer\_Dehe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santiago_ferrer_dehe/32/1469_2.png) [@Santiago\_Ferrer\_Dehe](https://discuss.elastic.co/u/Santiago_Ferrer_Dehe)
#### Post date: [June 24, 2014, 4:39am UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/5 "2014-06-24T04:39:50Z")

</div>

Thanks Jorg for the answer! I will turn on logging and came back with  
stacktrace!

On Monday, June 23, 2014 7:13:06 PM UTC-3, Jörg Prante wrote:

> Maybe it is not OOM but running out of file descriptors, that can only be  
> seen in the stack trace.
> 
> TransportClient, by default, tries to reconnect quite aggressively, so if  
> you could monitor the number of open network ports while you get OOM this  
> would be helpful for analysis. Maybe you have sniff mode on (which is the  
> default) and TransportClient retries are consuming all ports in despair...  
> you may switch log level to debug to find out what TransportClient is doing.
> 
> To remedy the cluster red situation a little bit you can increase the  
> timeout from 5s to say 30s (this will not solve the cause of the problem of  
> course, it delays the OOM). And you should take attention of the number of  
> responding shards in search responses, so you can bail out with fatal error  
> when the number of responding shards is too low. Of course you could also  
> check cluster health color once a minute or so.
> 
> Jörg
> 
> On Mon, Jun 23, 2014 at 10:29 PM, Santiago Ferrer Deheza \<  
> [sa.ferre...@gmail.com](mailto:sa.ferre...@gmail.com) \<javascript:\>\> wrote:
> 
> > The rare thing is that happends when the cluster status is red (thats why  
> > i think the client is the problem).
> > 
> > This is my code
> > 
> > ElasticResponse response;
> > 
> > try{
> > 
> > if(category != null && !category.isEmpty()){
> > 
> > SearchRequestBuilder searchQuery = client.prepareSearch(ConfigFactory.  
> > load().getString("elasticsearch.updater.index"))
> > 
> > .setSearchType(SearchType.QUERY\_THEN\_FETCH).setSize(numberOfAds);
> > 
> > BoolQueryBuilder qb = QueryBuilders
> > 
> > .boolQuery();
> > 
> > FunctionScoreQueryBuilder functionQueryBuilder = createFunctionScore(  
> > external, qb);
> > 
> > List\<Map\<String, Object\>\> ads = new ArrayList\<Map\<String, Object\>\>();
> > 
> > String categPath = Category.getCategoryIdPath(category);
> > 
> > Deque categories = new LinkedList\<Elasticsearch.  
> > SearchCategory\>();
> > 
> > for(String category : categPath.split("\_")){
> > 
> > categories.addFirst(new SearchCategory(category,false, categPath));
> > 
> > }
> > 
> > functionQueryBuilder = functionQueryBuilder.boostMode(CombineFunction.  
> > MULT);
> > 
> > functionQueryBuilder = functionQueryBuilder.scoreMode("max");
> > 
> > fillWithFunctions(functionQueryBuilder,categories,INITIAL\_BOOST);
> > 
> > SearchResponse searchResponse = searchQuery.setTypes(categPath.split(  
> > "\_")[0]).setQuery(functionQueryBuilder).execute().actionGet(50, TimeUnit.  
> > MILLISECONDS);
> > 
> > SearchHits hits = searchResponse.getHits();
> > 
> > Iterator it = hits.iterator();
> > 
> > int count = 0;
> > 
> > while(it.hasNext() && count \< numberOfAds){
> > 
> > Map\<String, Object\> sourceAsMap = it.next().sourceAsMap();
> > 
> > ads.add(sourceAsMap);
> > 
> > count++;
> > 
> > }
> > 
> > if(ads.isEmpty()){
> > 
> > Logger.info("ES - No ads found. Category: " + category);
> > 
> > response = new ElasticResponse(NO\_CONTENT);
> > 
> > }else{
> > 
> > response = new ElasticResponse(ads,OK, position);
> > 
> > }
> > 
> > }else{
> > 
> > Logger.info("ES - No category sent.");
> > 
> > response = new ElasticResponse(BAD\_REQUEST);
> > 
> > }
> > 
> > }catch(ElasticsearchTimeoutException e){
> > 
> > Logger.info("ES - Timeout.", e);
> > 
> > MetricsManager.getElasticsearchMetrics().incrementTimeoutCounter();
> > 
> > response = new ElasticResponse(REQUEST\_TIMEOUT);
> > 
> > }catch(Exception e){
> > 
> > Logger.error("Searching in elasticsearch",e);
> > 
> > response = new ElasticResponse(INTERNAL\_SERVER\_ERROR);
> > 
> > }
> > 
> > In the code you can see we define a timeout when executing _actionGet_.  
> > This works fine when the cluster is OK (we have a limited SLA) but when the  
> > ES Cluster goes down it doesn't take it into count, raising our SLA.
> > 
> > Thanks!
> > 
> > On Monday, June 23, 2014 4:07:06 PM UTC-3, Jörg Prante wrote:
> > 
> > > Most likely you have memory leaks in your app and your client memory was  
> > > exhausted.
> > > 
> > > If you can show the client code how you submit queries and process  
> > > responses and the stack traces you receive, more help could be possible to  
> > > offer.
> > > 
> > > A general hint is to switch to Java 7.
> > > 
> > > Jörg
> > > 
> > > On Mon, Jun 23, 2014 at 8:14 PM, Santiago Ferrer Deheza \<  
> > > [sa.ferre...@gmail.com](mailto:sa.ferre...@gmail.com)\> wrote:
> > > 
> > > > Hi there!
> > > > 
> > > > I'm having this exception (_'java.lang.OutOfMemoryError: GC overhead  
> > > > limit exceeded'_) _in client_ when my ES 1.1.1 cluster goes down. Im  
> > > > having problems with the cluster (work in progress) but it doesn't seem  
> > > > right that the client server throws _OutOfMemoryError._
> > > > 
> > > > Client Spcs:
> > > > 
> > > > - Java 6u32
> > > > - Ubuntu 12.04 LTS
> > > > - Elasticsearch 1.1.1 Jar
> > > > 
> > > > The client is only use for searching. Any clue? If more information is  
> > > > need just let me know.
> > > > 
> > > > Thanks,  
> > > > Santi!
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > 
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b34378cf-8f43-4f65-b8a6-e6f649150e67%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b59e9c2a-77d3-4d52-a330-d9d20a77e6bb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/eed35306-ebd9-4773-a838-ab8c18526c6f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eed35306-ebd9-4773-a838-ab8c18526c6f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:20am UTC](https://discuss.elastic.co/t/transportclient-throws-java-lang-outofmemoryerror-gc-overhead-limit-exceeded-when-all-nodes-in-cluster-are-down-1-1-1/18267/6 "2017-07-06T01:20:21Z")

</div>


