Re: [druid-user] java.lang.OutOfMemoryError: Map failed

Running OOM from an mmap process means that you have very little off-heap memory space available. How much off-heap is available when the task is running?

Rommel Garcia

Have you checked the JVM settings for your middle manager processes?

https://druid.apache.org/docs/latest/operations/basic-cluster-tuning.html#middlemanager

This might help explain how memory is used. How many middle managers do you have and how are they each configured in terms of druid.worker.capacity?

and

https://druid.apache.org/docs/latest/development/extensions-core/kafka-ingestion.html

How are your ingestion tasks configured? Are the maxRows and handoffperiod configured properly?

I would start with those pages and make sure that the the math makes sense for your environment.

Following Rommel and Rachel - just a note that there is work to better estimate required heap memory when constructing a Thetasketch (as you are doing) - if it were me for now I would increase heap sizes as per their notes.

Also, I note that Query Granularity is set to one hour - I wonder if the metrics processing part is having to consume too many rows? Ie it’s trying to output a sketch and all your metrics for each eventName and action on that hour. Have you tried reducing it to, say, MINUTE?