Elasticsearch outofmemory error


(bagui) #1

Hi,

I'm getting the below issue when trying to increase paging in Kibana which
is using elasticsearch.

[2014-02-28 11:24:29,280][DEBUG][action.search.type ] [Nut] [182865] Failed
to execute fetch phase
org.elasticsearch.ElasticsearchException: Java heap space
at
org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:37)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:451)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:406)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:150)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:134)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Getting the below error also in elastic search log.

[2014-02-28 11:29:55,121][WARN ][cluster.action.shard ] [Nut]
[logstash-2014.02.28][3] sending failed shard for [logstash-2014.02.28][3],
node[3DLIN4cCRPmMM_6a_1yTCA], [P], s[STARTED], indexUUID
[bWO_8-eUQQ6WDxcl2KoUkw], reason [engine failure, message
[MergeException[java.lang.OutOfMemoryError: Java heap space]; nested:
OutOfMemoryError[Java heap space]; ]]

My Heap allocation in elastic search is....

ES_HEAP_SIZE=256m

ES_DIRECT_SIZE=512m

Please help to rectify the same.
Subhadip

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dbf6a5e5-f722-4414-92e3-72268f6336f2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(David Pilato) #2

Basically depending on your dataset, it will require more memory or more nodes.
ES_HEAP_SIZE=256m is just too low.

Start with at least 1Gb RAM

As you have a 4Gb machine, you can set it to 2 Gb.
If it's a production machine, you should not run other IO heavy services on the same physical box (such as database).

My 2 cents

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 28 février 2014 à 11:15:28, Subhadip Bagui (i.bagui@gmail.com) a écrit:

Hi,

I'm getting the below issue when trying to increase paging in Kibana which is using elasticsearch.

[2014-02-28 11:24:29,280][DEBUG][action.search.type ] [Nut] [182865] Failed to execute fetch phase
org.elasticsearch.ElasticsearchException: Java heap space
at org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:37)
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:451)
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:406)
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:150)
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:134)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Getting the below error also in elastic search log.

[2014-02-28 11:29:55,121][WARN ][cluster.action.shard ] [Nut] [logstash-2014.02.28][3] sending failed shard for [logstash-2014.02.28][3], node[3DLIN4cCRPmMM_6a_1yTCA], [P], s[STARTED], indexUUID [bWO_8-eUQQ6WDxcl2KoUkw], reason [engine failure, message [MergeException[java.lang.OutOfMemoryError: Java heap space]; nested: OutOfMemoryError[Java heap space]; ]]

My Heap allocation in elastic search is....

ES_HEAP_SIZE=256m

ES_DIRECT_SIZE=512m
Please help to rectify the same.
Subhadip

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/dbf6a5e5-f722-4414-92e3-72268f6336f2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.531066f4.ded7263.23e%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.


(bagui) #3

Hi David,

I'm trying to move elastic search on a new system, but while trying to
start the service its giving below exception. Althrough the process is
running. There was old elasticsearch 0.90 copied which is not running now
as I checked. Please suggest.

[2014-02-28 16:40:13,588][WARN ][transport.netty ] [DJ] Message
not fully read (response) for [4] handler
future(org.elasticsearch.indices.recovery.RecoveryTarget$4@1b4268b), error
[true], resetting
[2014-02-28 16:40:13,589][WARN ][transport.netty ] [DJ] Message
not fully read (response) for [3] handler
future(org.elasticsearch.indices.recovery.RecoveryTarget$4@151d6cb), error
[true], resetting
[2014-02-28 16:40:13,590][WARN ][indices.cluster ] [DJ]
[logstash-2014.02.27][1] failed to start shard
org.elasticsearch.indices.recovery.RecoveryFailedException:
[logstash-2014.02.27][1]: Recovery failed from
[Brutacus][L0THepPDR6Cmx7O2jqVLdg][cloudclient1.aricent.com][inet[/10.203.251.143:9300]]
into
[DJ][LajLfvlYSAGZdsyFnorwEA][cloudclient.aricent.com][inet[/10.203.251.142:9300]]
at
org.elasticsearch.indices.recovery.RecoveryTarget.doRecovery(RecoveryTarget.java:303)
at
org.elasticsearch.indices.recovery.RecoveryTarget.access$300(RecoveryTarget.java:65)
at
org.elasticsearch.indices.recovery.RecoveryTarget$2.run(RecoveryTarget.java:171)

--
Thanks
Subhadip

On Friday, February 28, 2014 3:45:18 PM UTC+5:30, Subhadip Bagui wrote:

Hi,

I'm getting the below issue when trying to increase paging in Kibana which
is using elasticsearch.

[2014-02-28 11:24:29,280][DEBUG][action.search.type ] [Nut] [182865]
Failed to execute fetch phase
org.elasticsearch.ElasticsearchException: Java heap space
at
org.elasticsearch.ExceptionsHelper.convertToRuntime(ExceptionsHelper.java:37)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:451)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:406)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:150)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:134)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Getting the below error also in elastic search log.

[2014-02-28 11:29:55,121][WARN ][cluster.action.shard ] [Nut]
[logstash-2014.02.28][3] sending failed shard for [logstash-2014.02.28][3],
node[3DLIN4cCRPmMM_6a_1yTCA], [P], s[STARTED], indexUUID
[bWO_8-eUQQ6WDxcl2KoUkw], reason [engine failure, message
[MergeException[java.lang.OutOfMemoryError: Java heap space]; nested:
OutOfMemoryError[Java heap space]; ]]

My Heap allocation in elastic search is....

ES_HEAP_SIZE=256m

ES_DIRECT_SIZE=512m

Please help to rectify the same.
Subhadip

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d5c38f22-b2a6-4f7e-ba37-a4de3630db0f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #4