# Long running query, doc\_fields, and lots of exceptions

**URL:** <https://discuss.elastic.co/t/long-running-query-doc-fields-and-lots-of-exceptions/19392>\
**Category:** Elasticsearch\
**Created:** [August 21, 2014, 3:11pm UTC](https://discuss.elastic.co/t/long-running-query-doc-fields-and-lots-of-exceptions/19392 "2014-08-21T15:11:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andi\_Abes](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Andi\_Abes](https://discuss.elastic.co/u/Andi_Abes)\
**Post date:** [August 21, 2014, 3:11pm UTC](https://discuss.elastic.co/t/long-running-query-doc-fields-and-lots-of-exceptions/19392/1 "2014-08-21T15:11:32Z")

</div>

I'm running a relatively large index (2.8B documents, 32 shards) mostly for  
analytics (all fields are not\_analyzied, doc\_fields).  
Many queries take a long time to execute, and often, produce a plethora of  
shard failures, that I'm trying to track down and fix.  
Would appreciate ideas.

Here's a collection generated by 1 query:

```
        "shard": 7,
        "status": 500,
        "reason": 

```

"NodeDisconnectedException[[i-5907f074][inet[/10.0.1.226:9300]][search/phase/query]  
disconnected]"

```
        "shard": 4,
        "status": 404,
        "reason": 

```

"RemoteTransportException[[i-db51a6f6][inet[/10.0.1.229:9300]][search/phase/fetch/id]];  
nested: SearchContextMissingException[No search context found for id  
[5946]]; "

```
        "status": 500,
        "reason": 

```

"RemoteTransportException[[i-d4b559f9][inet[/10.0.1.231:9300]][search/phase/query]];  
nested: IllegalArgumentException[Self-suppression not permitted]; nested:  
OutOfMemoryError[Java heap space]; "

I've seen sporadic occurrences of SearchContextMissingException even in the  
absence of OOM - any pointers on how to increase timeouts.  
Obviously, the out of memory is an issue, which I'm planning to resolve by  
moving some shards around. (The index is hosted on a combination of  
machines comprising of 2 types: 15G ram and 4 Gig ram. The smaller nodes  
only have 2 shards each, while the large ones have many more.)

--  
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/fd8f10d5-d8e6-4b24-be30-65bf378a1648%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd8f10d5-d8e6-4b24-be30-65bf378a1648%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:07am UTC](https://discuss.elastic.co/t/long-running-query-doc-fields-and-lots-of-exceptions/19392/2 "2017-07-06T01:07:11Z")

</div>

Closed on July 6, 2017, 1:07am UTC


