Elasticsearch Version 2.3.2
ES_HEAP_SIZE=2G
I have a usecase to perform indexing of attachments to ES. Due to certain use case, i cannot split the docs/attachments and index them as separate docs within ES. I was able to index 14 attachments (each attachment 130MB. however when i try to query i get the below issue. When i query, I am not requesting all the fields of the documents particularly i am not requesting for attachment field.
sample json doc
{
"name": "xyz",
"title", "xx",
attachment: "............"
}
[2017-05-04 03:42:22,869][DEBUG][action.search ] [Doop] [17] Failed to execute fetch phase
RemoteTransportException[[Doop][slc12oxp.us.x.com/10.196.3.67:9300][indices:data/read/search[phase/fetch/id]]]; nested: ElasticsearchException[Java heap space]; nested: OutOfMemoryError[Java heap space];
Caused by: ElasticsearchException[Java heap space]; nested: OutOfMemoryError[Java heap space];
at org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:50)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:604)
at org.elasticsearch.search.action.SearchServiceTransportAction$FetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:408)
at org.elasticsearch.search.action.SearchServiceTransportAction$FetchByIdTransportHandler.messageReceived(SearchServiceTransportAction.java:405)
at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:75)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Unknown Source)
at java.lang.String.(Unknown Source)
at java.lang.StringBuilder.toString(Unknown Source)
at com.fasterxml.jackson.core.util.TextBuffer.contentsAsString(TextBuffer.java:356)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2412)
at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getText(UTF8StreamJsonParser.java:285)
at org.elasticsearch.common.xcontent.json.JsonXContentParser.text(JsonXContentParser.java:84)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.readValue(AbstractXContentParser.java:299)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMap(AbstractXContentParser.java:274)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMap(AbstractXContentParser.java:245)
at org.elasticsearch.common.xcontent.support.AbstractXContentParser.map(AbstractXContentParser.java:208)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:83)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMapAndType(SourceLookup.java:88)
at org.elasticsearch.search.lookup.SourceLookup.loadSourceIfNeeded(SourceLookup.java:64)
at org.elasticsearch.search.lookup.SourceLookup.extractRawValues(SourceLookup.java:130)
at org.elasticsearch.search.fetch.FetchPhase.createSearchHit(FetchPhase.java:241)
at org.elasticsearch.search.fetch.FetchPhase.execute(FetchPhase.java:178)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:592)
... 9 more