Heap Space error in Druid while injecting data

I am facing an issue while injecting one billion data by native-batch injection from Postgresql through json . I made configurations in jvm config for each services as min=2048mb,max=4096mb,and had also increased middlemanager directmemeorysize to 12gb ,in tuning config I specified maxRowsInMemory=2000000, and successfully ingested 5000000(50lak) data.


This is a companion discussion topic for the original entry at https://stackoverflow.com/questions/74316438/heap-space-error-in-druid-while-injecting-data