Hi Team,
We have 2 brokers and 4 historicals in our cluster. The broker configuration is as below:
Heap: 16GB
DM: 22GB
druid.broker.http.maxQueuedBytes=10Mib
The brokers restart every week. By the 4th or 5th day, the used heap memory (jvm/mem/used) is > 15GB and both of them crash with OOM on the 5th day. The used heap memory is ~2GB on startup and increases steadily over the next few days.
According to the documentation, broker uses heap to store:
Segment timeline of all available segments
Segment metadata cache of all available segments
Partial unmerged query results
The cluster has around 100k-120k available segments and tons more inactive segments. Our understanding is that inactive segment data is not cached on the broker and hence should not contribute to the memory usage.
Most of the queries are groupBy queries which would need the results to be merged on the broker. But this memory should be released once the query results are returned to the client. Correct?
The recommendation for broker heap sizing is 4-8GiB for a small/medium cluster (~15 servers or less). What could be taking up so much of heap space in the broker process?
Could there be some memory leak which is leading to the OOM? Are there any monitors in Druid which would detect memory leaks?
In addition most of the ingestion is done using MSQ. Not sure if it adds additional load on the broker heap but I do see the queries (INSERT/REPLACE) logged in the broker logs.
Druid Version: 24.0.2
Thanks,
AR.