Could not reserve enough space for object heap

Could not reserve enough space for object heap

While running java application if you see error “Could not reserve enough space for object heap” means JMV memory is full and there no space available. This could be fix using different combination of memory size as below:

add -XX:MaxHeapSize=256m (Increase it, if still getting exception)

OR

-Xmx256M -XX:MaxPermSize=512m

OR I have seen this on tomcat server, when you are using 32 bit and setting large memory size as below:

-Xms1536m -Xmx1536m Try decrease this memory: Xms1336m -Xmx1336m OR Xms1024m -Xmx1024m

After setting above if you getting error imcompatible size just use -Xmx:

-Xmx1336m OR -Xmx1024m

Leave a Reply

Your email address will not be published. Required fields are marked *