java.lang.OutOfMemoryError: PermGen space

ZeroTurnaround Homepage Forums JRebel Support java.lang.OutOfMemoryError: PermGen space


This topic contains 3 replies, has 3 voices, and was last updated by  johnsonjeven 3 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #47903

    web n

    The error occurs during startup. We appreciate much your help.

    JRebel version 5.6.3a


    Bram Inniger


    Tricky to say exactly what is going wrong with this amount of information, but in general PermGen errors can occur by simply enabling JRebel.
    JRebel itself has a very small impact on processing power, but does lead to an increase in memory needs, and certainly PermGen.

    Please try doubling the amount of PermGen you currently have.
    Should you not have set any PermGen yourself than 512Mb will do.
    Simply add this to your VM startup arguments:

    If this does not work, then please enable debug logging, and mail us your debug log together with the console output to

    Hope this helps!


    web n

    Hi Bram,

    I admit that the amount of information is limited. Let me elaborate here.

    The error disappears when JRebel is disabled.

    Web container: JBoss Application server 7.1.1

    I have been setting -XX:MaxPermSize=712M but it doesn’t help.

    set “JAVA_OPTS=-Xms1800M -Xmx1800M -XX:MaxPermSize=968M -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled”

    I have emailed the log files to the support mailbox. Thanks!!



    Java applications are only allowed to use a limited amount of memory. This limit is specified during application startup. Java heap space indicates object could not be allocated in the Java heap. With -Xmx you can configure more memory for you JVM. To be sure that you don’t leak or waste memory.


    Starting a JVM like below will start it with 256MB of memory, and will allow the process to use up to 2048MB of memory:

    java -Xmx2048m -Xms256m

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.