Fixing Runtime “Out of memory” Errors

Document created by Candida Rodriguez-Lee on Oct 10, 2014Last modified by Candida Rodriguez-Lee on Oct 10, 2014
Version 2Show Document
  • View in full screen mode

Q. How to fix Out of memory error that occurs at runtime when you run out of the JVMs permanent memory

 

A. Increasing the -Xms and -Xmx only increases the runtime heap allocation, but does not increase the permanent memory allocation (which is used to store classes, interned strings, etc.).

 

If you are using a JDK from Sun Microsystems, you can also use MaxPermSize

settings.

 

Example -Xms512m -Xmx1024m -XX:MaxPermSize=256m

Attachments

    Outcomes