Problem:
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:
- a large number of files on your system
- an extremely large benchmark document
- memory leak with some apis / user defined classes
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.
Solution:
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
GOOD:
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)
Share or Bookmark This Post With :
|
Posted On January 10th, 2008
[...] These icons link to social bookmarking sites where readers can share and [...] |
|
|
Posted On July 9th, 2009
Hi Laxman, 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 ? Thanks |
|
|
Posted On July 10th, 2009
|
Leave a Reply
- Roundcube – Free browser-based IMAP client
- mtop – MySQL terminal based query monitor
- Kohana – Swift, Secure, and Small PHP 5 Fram...
- FormMail – free form processing PHP script
- Xataface – The fastest way to build a front-...
- dotProject – the Open Source Project Managem...
- The jQuery Form Plugin
- DocVerse has officially been acquired by Google
- HDGraph – a free tool for Windows to draw mu...
- RandomClass jQuery Plugin
- Send emails using PHPMailer an...
- Firefox Addons Essential for S...
- Free SEO Tools From SEOMoz.org...
- URL Rewriting for PHP Web Appl...
- Multiple Instances of Tomcat w...
- Apache 2.x + Tomcat 4.x + Load...
- Pagination in JSP/Java
- PHP – Mysql Open Source ...
- java.lang.OutOfMemoryError: Ja...
- HOW TO Subversion+Apache on Fe...




