The error ‘java.lang.OutOfMemoryError: Java heap space’ is caused when the JVM (Java Virtual Machine) runs out of available memory during processing. This can be caused by:
The default heap memory in JVM sets a maximum heap size of 64MB. The directions below describe how to increase this value on UNIX and Windows systems.
For UNIX systems, edit the catalina.sh file under tomcat_home/bin and set JAVA_OPTS as below
Where ‘-Xmx1024m’ sets the maximum heap size to 1024MB of memory. Higher values may be used where additional memory is available.
For Windows systems, edit catalina.bat, change the text -Xmx256m to a larger value. For example:
Where "-Xmx1024m" sets the maximum heap size to 1024MB of memory. Higher values may be used where additional memory is available.
Memory Problems With Mysql Connector
mysql.jar (221 kb, 10/7/2003)
mysql-connector-java-3.0.16-ga-bin.jar (231 kb, 11/16/2004)
mysql-connector-java-3.0.17-ga-bin.jar (241 kb, 6/22/2005)
BAD (memory leak):
mysql-connector-java-3.1.10-bin.jar (409 kb, 6/23/2005)
mysql-connector-java-3.1.14-bin.jar (449 kb, 10/18/2006)
… (other versions)
mysql-connector-java-5.1.6-bin.jar (687 KB, 3/5/2008)
[…] These icons link to social bookmarking sites where readers can share and […]
I have set -Xmx1024m at the run.conf of the JBOSS. Instead of that, I am getting this error, “java.lang.OutOfMemoryError”. The machine has 2GB of RAM. Do you know the reason ?
Check below link, may be helpful for u.
Comments are closed.