Elastic search using a lot of memory, GC thrashing

(Petey Pab Pro) #1


My ES instance is using 97% of its heap, and is thus garbage collecting almost constantly, and preventing any requests from being successful. Thing is, I can't figure out what is eating up all the memory. There is no field_data usage at all.

Here are my node stats

Please let me know if I can provide any more information. Any help would be appreciated. Thanks!

EDIT: Here is the result of the leak suspects report run on the Elasticsearch heap. It appears to be a memory leak related to groovy scripting. Should I open an issue on github? Or is it possibly something I'm doing wrong?

Elasticsearch 2.4.1 Cluster stuck on Heap high usage
Heap issue after upgrading Elasticsearch from v1.7.5 to v2.4.1
(Daniel Mitterdorfer) #2


thanks for your analysis! You don't write which version of Elasticsearch you use but it is possible that we fixed the problem in the meantime. So, I suggest that you try to upgrade to the latest possible version first on a test instance and see if the problem persists.

In case it persists, it would be great if you could strip down your scenario so we can reproduce it and then create a ticket on Github.


Please, help me tune java GC parameters
(Petey Pab Pro) #3

Hi Daniel,

Sorry, I'm using 2.3.1. I actually did wind up already creating a ticket on Github, to which Yannick responded. Apparently there is a well known Groovy memory leak that is causing this. The best solution seems to be to use native Java scripts rather than Groovy, or at least set Dgroovy.use.classvalue=true to revert back to older Groovy behavior (which has problems of its own, but may work here).

(Daniel Mitterdorfer) #4


ah, I recall the ticket now. Thanks for posting the link here.


(system) #5