I have already set it to be 4GB.
Needs["JLink`"] ReinstallJava[JVMArguments -> "-Xmx4096m"]
Very frsutrating after a long wait and still getting this error. My laptop does have 32G of RAM. But is there a way to figure out how much to set in advance (instead of setting to the limit)?