Recently, I found my elasticsearch cluster always get full gc every two days.
Cluster settings are as follows:
es version: v2.3.2
2 * node, every node set 8G for es
data size is just 500MB+ with 5 indices
I recognized that groovy memory leak issue may exist in v2.3.2.
Groovy scripting - possible memory leak ES 2.3.3
So I try to reduce the use of script in update and user params instead if script lines have dynamic params.
Everything seems to goes well before jstat -gcold prints as follows:
I think full gc will finally comes since the use of old gc still increase.
So I try to update es version to v5.4.x. One days later, org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Entry still increase as v2.3.2.
num #instances #bytes class name
----------------------------------------------
1: 459350 992735952 [B
2: 547852 219588688 [C
3: 1826845 102303320 org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Entry
4: 1485050 62888720 [Ljava.lang.Object;
5: 998557 31953824 java.util.HashMap$Node
6: 1322667 31744008 org.codehaus.groovy.util.FastArray
7: 146991 21167600 [Lorg.codehaus.groovy.util.ComplexKeyHashMap$Entry;
8: 113728 14367840 [Ljava.util.HashMap$Node;
9: 421638 13492416 org.wltea.analyzer.dic.DictSegment
10: 529427 12706248 java.lang.String
Here is my question:
groovy memory leak is solved in es v2.4.0, why it seems doesn't work...
Is there any best way to use script in update which may not result in cluster frequent full gc ?
Thank you!
