Heap issue after upgrading Elasticsearch from v1.7.5 to v2.4.1

Hi,

After upgrading Elasticsearch from v1.7.5 to v2.4.1, we are facing issues with the JAVA Heap. The following image shows the behavior of the java heap memory usage before and after the upgrade (the red line identifies the day of the upgrade) :

After this date, the heap decrease only when we restart a node.

Following the advice of an Elastic member, we have dump our java heap and there is the result :

So our issue seems related to a leak in groovy script (we use lot of function score queries using script scoring with groovy language) and this discuss : Elastic search using a lot of memory, GC thrashing

As our scripts are not very complex, we plan to replace groovy scripts by expression scripts in order to fix asap. Is a good idea ?

Please let me know if I can provide any more information. Thanks.

Another idea could be to switch to 5.0.0 and use the default new Painless langage... :slight_smile:

1 Like

Yeah, our solution was to use Javascript instead of Groovy, so you could try that as well. But probably 5.0/painless makes the most sense at this point.

Thank you for your answers. We will switch to expression scripts first. Then we will work to be able to switch to 5.0 and use Painless langage in the future :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.