John’s Oracle Experiences

My everyday experiences with Oracle products

Prevent “java.lang.OutOfMemoryError: PermGen space failure” on Oracle Application Server 10.1.3 web deployments

Posted by John Paul van Helvoort on July 1, 2009

Once in a while a re-deployment of a web-app with jdeveloper caused the OC4J server to hang completely. It usually goes right but once in a while the whole OC4J server hangs and a complete restart of opmn is needed.

Logfiles in $ORACLE_HOME/opmn/logs show the following ;

09/06/26 13:39:20 FINER: RmiTransport$DiscreteMessageIn. Receiving message with 22 bytes
09/06/26 13:39:20 FINER: RmiTransport$DiscreteMessageIn. Received 22 bytes of message
09/06/26 13:39:22 WARNING: DeployerRunnable.run java.lang.OutOfMemoryError: PermGen spaceoracle.oc4j.admin.internal.DeployerException:

java.lang.OutOfMemoryError: PermGen space
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:139)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.OutOfMemoryError: PermGen space

This behaviour can be altered by adding an option to the Start-parameters in as-control.
By adding “-XX:MaxPermSize=256m” and restarting the OC4J container , the problem did not appear anymore when deploying intensively… By default the MaxPermSize size is set small and differs per version but willl cause the container to crash when used intensively in deployment actions.

In addition to this you should also increase the “Maximum heap size” and “Initial heap size”.

2 Responses to “Prevent “java.lang.OutOfMemoryError: PermGen space failure” on Oracle Application Server 10.1.3 web deployments”

  1. Sudhi said

    Hi john,

    I am facing the same issue-when i deploy and restart that applicaiton i get ‘OutOfMemoryError: PermGen space” error.

    please let me know where i have to add this entry (-XX:MaxPermSize=256m)?
    and where i have to modify maximum heap size?

    thank you.
    regards,
    Sudhi.

  2. Hi Sudhi,

    This setting can be done in your ascontrol.

    Here you will find a screenshot of it !

    Regards,
    John

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>