Recurring Heap Problems

Hello ES group,
I have had recurring heap problems ("java.lang.OutOfMemoryError: Java heap
space”) on my 2-nodes ES cluster (16GB RAM/node, 8GB allocated to ES) the
last month and I really don’t know how to tackle them.
It started at a time where I was doing aggregations on a “milliseconds
since EPOCH” field, and I was given to understand that it was probably the
cause of my problems since it created a very large number of buckets before
aggregating them. So I stopped doing aggregations on this field (I did not
delete it though).
Recently I was told that my index had too few shards respective to its size
(2 primary shards, 1 replica each, 100-150 Mdocs). So I decided to try
reindexing into a new index with more shards (I am using es-reindex.rb,
which itself uses the bulk API). But now I am having OutOfMemoryError happen
during reindexing. Needless to say, once an OutOfMemoryError happens, my
cluster seems to never recover until I reboot each node.
It should be noted that I use ES almost exclusively with search_type=count,
since I am only trying to do analytics on website data.
I am not sure how to proceed from this point, I don’t know the right tool
to pinpoint my memory problems and there doesn’t seem to be a way to ask ES
for heap usage by index/query/task type
I’d be very grateful for any advice you can offer.
Thanks in advance,
Vincent Bernardi

--
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/4687cf5b-34c8-4f5d-88be-f134367a888b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

In my situation I had configured ES_HEAP_SIZE in the yml file with no
effectt (on centos 6.5)
ES was running with default memory configured allways. This is evenso with
ES 1.3.4.

My solution was to configure this in /etc/init.d/elasticsearch

Another setting that can be helpfull:

indices.fielddata.cache.size:  40%

On Wednesday, October 22, 2014 11:19:34 AM UTC+2, Vincent Bernardi wrote:

Hello ES group,
I have had recurring heap problems ("java.lang.OutOfMemoryError: Java
heap space”) on my 2-nodes ES cluster (16GB RAM/node, 8GB allocated to
ES) the last month and I really don’t know how to tackle them.
It started at a time where I was doing aggregations on a “milliseconds
since EPOCH” field, and I was given to understand that it was probably the
cause of my problems since it created a very large number of buckets before
aggregating them. So I stopped doing aggregations on this field (I did not
delete it though).
Recently I was told that my index had too few shards respective to its
size (2 primary shards, 1 replica each, 100-150 Mdocs). So I decided to try
reindexing into a new index with more shards (I am using es-reindex.rb,
which itself uses the bulk API). But now I am having OutOfMemoryError happen
during reindexing. Needless to say, once an OutOfMemoryError happens, my
cluster seems to never recover until I reboot each node.
It should be noted that I use ES almost exclusively with
search_type=count, since I am only trying to do analytics on website data.
I am not sure how to proceed from this point, I don’t know the right tool
to pinpoint my memory problems and there doesn’t seem to be a way to ask ES
for heap usage by index/query/task type
I’d be very grateful for any advice you can offer.
Thanks in advance,
Vincent Bernardi

--
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/e133f38e-7e1c-40e1-a40c-2b8a8d8a4a86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.