Dremio stopped automatically java.lang.OutOfMemoryError: Java heap space

I think by configuring dremio-env properly should solve your problem. I’ve an answered related question here
As my current implementation (3.1.11) for 64GB executors:
DREMIO_MAX_HEAP_MEMORY_SIZE_MB=8192
DREMIO_MAX_DIRECT_MEMORY_SIZE_MB=53248

Hope this can help you