I've tried to increase CATALINA_OPTS to = "--Xms128M -Xmx1024M".
I tried the following commands to check the heap size:
long heapSize = Runtime.getRuntime().totalMemory(); //Btw, what's this totalMemory() ?
long heapMaxSize = Runtime.getRuntime().maxMemory();
long heapFreeSize = Runtime.getRuntime().freeMemory();
I've got the output as follows:
heapSize = 11632640
heapMaxSize = 530907136 (Does this mean the Max Size is 530MB? It doesn't increase to 1GB)
heapFreeSize = 3373504 (Free memory is only 3MB, does this cause the system to prompt "Out of Memory" error?)