Heap threshold exceeded, leading to cancelled tasks

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.12.0

Describe the issue:
I notice this in Opensearch log:
[2024-09-25T15:18:50,069][WARN ][o.o.s.b.SearchBackpressureService] [elasticsearch-1] [monitor_only mode] cancelling task [8606] due to high resource consumption [heap usage exceeded [110.1mb >= 10.9mb]]

Configuration:
RAM of server: 2GB
OPENSEARCH_JAVA_OPTS = “-Xms1024m -Xmx1024m”

As mentioned in Search backpressure, the threshold for heap is 70%. Then the threshold in my case should be 700mb, why the number here is 10.9mb.

Where does it come from?

Hi @quangdutran, my understanding is that you were left with 10.9mb in your heap (and the task needed 110.1mb) I guess due to other operations or garbage collector…

To prevent this you will need more memory.

Best,
mj

2 Likes

Oh yes, it makes sense. Thanks Mantas

1 Like